C# 클래스 SensorShare.DatabaseHelper

Helper class to consolidate database access functions into one location
파일 보기 프로젝트 열기: MarkPaxton/SensorShare3

공개 메소드들

메소드 설명
DeleteServerConfigData ( System.Guid id, SQLiteConnection database ) : void
GetAllServerData ( SQLiteConnection database ) : List
GetSensorData ( ScienceScope.SensorID idToFind, SQLiteConnection database ) : ScienceScope.SensorDefinition
GetServerByID ( SQLiteConnection connection, System.Guid serverID ) : ServerData
GetServerNameByID ( SQLiteConnection connection, System.Guid serverID ) : ServerData
GetServerSaved ( SQLiteConnection connection, System.Guid serverID ) : bool
SaveLogMessage ( SQLiteConnection connection, String message ) : void
SaveQuestionMessage ( QuestionMessage question, SQLiteConnection database ) : void
SaveServerConfigData ( SQLiteConnection connection, ServerData data ) : void
deleteAnnotation ( System.Guid id, SQLiteConnection database ) : void
getAnnotation ( System.Guid id, SQLiteConnection database ) : IAnnotation

Gets an annotation from the client annotation database

getAnnotation ( System.Guid id, SQLiteConnection database, string whereCondition ) : IAnnotation

Gets an annotation from the client annotation database and the where condition specified

getAnswer ( System.Guid question_id, System.Guid author_id, SQLiteConnection database ) : QuestionAndAnswerAnnotation
getQuestionMessage ( System.Guid id, SQLiteConnection database ) : QuestionMessage
getSavedAnnotation ( System.Guid id, SQLiteConnection database ) : IAnnotation
getStats ( System.Guid server_id, string whereCondition, SQLiteConnection database ) : double[]
getStdDev ( System.Guid server_id, double means, int count, SQLiteConnection database ) : double[]
isAnnotationSaved ( System.Guid id, SQLiteConnection database ) : bool
saveAnnotation ( System.Guid id, System.DateTime time, System.Guid author_id, string author, AnnotationType type, string text, string picture_location, System.Guid question_id, System.Guid server_id, SQLiteConnection database ) : void
saveAnnotation ( System.Guid id, System.DateTime time, System.Guid author_id, string author, AnnotationType type, string text, string picture_location, System.Guid question_id, System.Guid server_id, bool saved, SQLiteConnection database ) : void
saveAnnotation ( System.Guid id, System.DateTime time, System.Guid author_id, string author, AnnotationType type, string text, string picture_location, System.Guid server_id, SQLiteConnection database ) : void
saveSensorReadings ( SensorReadings data, SQLiteConnection database ) : void
saveSensorReadingsList ( List dataList, SQLiteConnection database ) : void
saveSensorReadingsList ( List dataList, SQLiteConnection database ) : void

비공개 메소드들

메소드 설명
ResultToServerData ( SQLiteDataReader result ) : ServerData

메소드 상세

DeleteServerConfigData() 공개 정적인 메소드

public static DeleteServerConfigData ( System.Guid id, SQLiteConnection database ) : void
id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 void

GetAllServerData() 공개 정적인 메소드

public static GetAllServerData ( SQLiteConnection database ) : List
database System.Data.SQLite.SQLiteConnection
리턴 List

GetSensorData() 공개 정적인 메소드

public static GetSensorData ( ScienceScope.SensorID idToFind, SQLiteConnection database ) : ScienceScope.SensorDefinition
idToFind ScienceScope.SensorID
database System.Data.SQLite.SQLiteConnection
리턴 ScienceScope.SensorDefinition

GetServerByID() 공개 정적인 메소드

public static GetServerByID ( SQLiteConnection connection, System.Guid serverID ) : ServerData
connection System.Data.SQLite.SQLiteConnection
serverID System.Guid
리턴 ServerData

GetServerNameByID() 공개 정적인 메소드

public static GetServerNameByID ( SQLiteConnection connection, System.Guid serverID ) : ServerData
connection System.Data.SQLite.SQLiteConnection
serverID System.Guid
리턴 ServerData

GetServerSaved() 공개 정적인 메소드

public static GetServerSaved ( SQLiteConnection connection, System.Guid serverID ) : bool
connection System.Data.SQLite.SQLiteConnection
serverID System.Guid
리턴 bool

SaveLogMessage() 공개 정적인 메소드

public static SaveLogMessage ( SQLiteConnection connection, String message ) : void
connection System.Data.SQLite.SQLiteConnection
message String
리턴 void

SaveQuestionMessage() 공개 정적인 메소드

public static SaveQuestionMessage ( QuestionMessage question, SQLiteConnection database ) : void
question QuestionMessage
database System.Data.SQLite.SQLiteConnection
리턴 void

SaveServerConfigData() 공개 정적인 메소드

public static SaveServerConfigData ( SQLiteConnection connection, ServerData data ) : void
connection System.Data.SQLite.SQLiteConnection
data ServerData
리턴 void

deleteAnnotation() 공개 정적인 메소드

public static deleteAnnotation ( System.Guid id, SQLiteConnection database ) : void
id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 void

getAnnotation() 공개 정적인 메소드

Gets an annotation from the client annotation database
public static getAnnotation ( System.Guid id, SQLiteConnection database ) : IAnnotation
id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 IAnnotation

getAnnotation() 공개 정적인 메소드

Gets an annotation from the client annotation database and the where condition specified
public static getAnnotation ( System.Guid id, SQLiteConnection database, string whereCondition ) : IAnnotation
id System.Guid
database System.Data.SQLite.SQLiteConnection
whereCondition string
리턴 IAnnotation

getAnswer() 공개 정적인 메소드

public static getAnswer ( System.Guid question_id, System.Guid author_id, SQLiteConnection database ) : QuestionAndAnswerAnnotation
question_id System.Guid
author_id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 QuestionAndAnswerAnnotation

getQuestionMessage() 공개 정적인 메소드

public static getQuestionMessage ( System.Guid id, SQLiteConnection database ) : QuestionMessage
id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 QuestionMessage

getSavedAnnotation() 공개 정적인 메소드

public static getSavedAnnotation ( System.Guid id, SQLiteConnection database ) : IAnnotation
id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 IAnnotation

getStats() 공개 정적인 메소드

public static getStats ( System.Guid server_id, string whereCondition, SQLiteConnection database ) : double[]
server_id System.Guid
whereCondition string
database System.Data.SQLite.SQLiteConnection
리턴 double[]

getStdDev() 공개 정적인 메소드

public static getStdDev ( System.Guid server_id, double means, int count, SQLiteConnection database ) : double[]
server_id System.Guid
means double
count int
database System.Data.SQLite.SQLiteConnection
리턴 double[]

isAnnotationSaved() 공개 정적인 메소드

public static isAnnotationSaved ( System.Guid id, SQLiteConnection database ) : bool
id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 bool

saveAnnotation() 공개 정적인 메소드

public static saveAnnotation ( System.Guid id, System.DateTime time, System.Guid author_id, string author, AnnotationType type, string text, string picture_location, System.Guid question_id, System.Guid server_id, SQLiteConnection database ) : void
id System.Guid
time System.DateTime
author_id System.Guid
author string
type AnnotationType
text string
picture_location string
question_id System.Guid
server_id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 void

saveAnnotation() 공개 정적인 메소드

public static saveAnnotation ( System.Guid id, System.DateTime time, System.Guid author_id, string author, AnnotationType type, string text, string picture_location, System.Guid question_id, System.Guid server_id, bool saved, SQLiteConnection database ) : void
id System.Guid
time System.DateTime
author_id System.Guid
author string
type AnnotationType
text string
picture_location string
question_id System.Guid
server_id System.Guid
saved bool
database System.Data.SQLite.SQLiteConnection
리턴 void

saveAnnotation() 공개 정적인 메소드

public static saveAnnotation ( System.Guid id, System.DateTime time, System.Guid author_id, string author, AnnotationType type, string text, string picture_location, System.Guid server_id, SQLiteConnection database ) : void
id System.Guid
time System.DateTime
author_id System.Guid
author string
type AnnotationType
text string
picture_location string
server_id System.Guid
database System.Data.SQLite.SQLiteConnection
리턴 void

saveSensorReadings() 공개 정적인 메소드

public static saveSensorReadings ( SensorReadings data, SQLiteConnection database ) : void
data SensorReadings
database System.Data.SQLite.SQLiteConnection
리턴 void

saveSensorReadingsList() 공개 정적인 메소드

public static saveSensorReadingsList ( List dataList, SQLiteConnection database ) : void
dataList List
database System.Data.SQLite.SQLiteConnection
리턴 void

saveSensorReadingsList() 공개 정적인 메소드

public static saveSensorReadingsList ( List dataList, SQLiteConnection database ) : void
dataList List
database System.Data.SQLite.SQLiteConnection
리턴 void