Documentation ¶
Index ¶
Constants ¶
View Source
const TimeStampFormat = "2006-01-02 15:04:05.999999999"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompareItem ¶
type CompareItem struct { Name string Values []interface{} }
type Database ¶
type Database struct { DB *sql.DB TableName string TimeField string PrimaryField string FieldInfos []zsql.FieldInfo StructType reflect.Type Lock sync.Mutex // contains filtered or unexported fields }
func CreateDB ¶
func CreateDB(relPath string, tableName string, istruct interface{}, deleteDays, deleteFreqSecs float64, indexFields []string) (db *Database, err error)
CreateDB creates (if *relPath* doesn't exist) a file and a sqlite DB pointer opened to it. It creates a table *tableName* using the structure istruct as its column names. The field with db:",primary" set, is the primary key. If there is more than one time.Time type, set db:",eventtime" tag to make it the event's time.
func (*Database) DeleteEvent ¶
Click to show internal directories.
Click to hide internal directories.