Documentation ¶
Overview ¶
Package for handling DB operations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBRow ¶
type DBRow struct { Id int Date string Beacon string Name string Record sql.NullString UserActions sql.NullString }
DBRow is the structure of the sensor table in the database. Each field is exported so that it can be json encoded. Record can be empty (null) so it uses the sql type NullString.
func ReadRecords ¶
Retrieve all data from the database. If isTesting is true, get records from sample database instead of the real one. If error has occurred, return the error along with the descriptive error message
Click to show internal directories.
Click to hide internal directories.