C# Класс SensorShare.DatabaseHelper

Helper class to consolidate database access functions into one location
Показать файл Открыть проект

Открытые методы

Метод Описание
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