Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func UpdateSchema ¶
Types ¶
type DBInfo ¶
type DBInfo struct {
ID int `json:"id" desc:"Unique database ID"`
CreatedAt time.Time `json:"createdAt" gorm:"index" desc:"Timestamp this DB record has been created"`
UpdatedAt time.Time `json:"updatedAt" gorm:"index" desc:"Timestamp this DB record has been updated the last time"`
SchemaVersion int `json:"schemaVersion" desc:"Database schema version"`
}
type Log ¶
type Log struct {
ID sqldb.FieldInt64 `json:"id" desc:"Unique database ID"`
CreatedAt sqldb.FieldTime `json:"createdAt" gorm:"index" desc:"Timestamp this DB record has been created"`
UpdatedAt sqldb.FieldTime `json:"updatedAt" gorm:"index" desc:"Timestamp this DB record has been updated"`
Level sqldb.FieldString `json:"level" gorm:"index" desc:"level"`
Source sqldb.FieldString `json:"source" gorm:"index" desc:"source"`
Msg sqldb.FieldString `json:"msg" desc:"msg"`
}
type ORM ¶
type ORM struct {
SchemaVersion int
SchemaModels []ORMSchemaModel
Gorm *gorm.DB
// contains filtered or unexported fields
}
func NewORM ¶
func NewORM(driver ORMDriver, schemaVersion int, schemaModels []ORMSchemaModel) (*ORM, error)
func (*ORM) Synchronized ¶
func (*ORM) VerifyCfgChanged ¶
type ORMSchemaModel ¶
Click to show internal directories.
Click to hide internal directories.