Documentation ¶
Index ¶
- Constants
- func HasDeletedAt(model interface{}) (bool, error)
- func InitializeTable(gorpdb *gorp.DbMap, model interface{}, table string) error
- func InitializeTableAdv(gorpdb *gorp.DbMap, model interface{}, table string, primary_field string) error
- func ModelCreatedAt(model interface{}) (int, error)
- func ModelDeletedAt(model interface{}) (int, error)
- func ModelMarkCreate(model interface{}) error
- func ModelMarkDelete(model interface{}) error
- func ModelMarkUpdate(model interface{}) error
- func ModelUpdatedAt(model interface{}) (int, error)
- func PrimaryField(model map[string]interface{}) (string, int, error)
- func SqlxInsert(model map[string]interface{}, table string, db_type string) (string, []interface{}, error)
- func SqlxUpdate(model map[string]interface{}, table string, db_type string) (string, []interface{}, error)
- func UpdateOrInsert(model map[string]interface{}) (int, error)
- type ModelDeletable
- type ModelInfo
Constants ¶
View Source
const DB_INSERT = 1
View Source
const DB_UPDATE = 2
Variables ¶
This section is empty.
Functions ¶
func HasDeletedAt ¶
func InitializeTable ¶
func InitializeTableAdv ¶
func ModelCreatedAt ¶
func ModelDeletedAt ¶
func ModelMarkCreate ¶
func ModelMarkCreate(model interface{}) error
func ModelMarkDelete ¶
func ModelMarkDelete(model interface{}) error
func ModelMarkUpdate ¶
func ModelMarkUpdate(model interface{}) error
func ModelUpdatedAt ¶
func SqlxInsert ¶
func SqlxInsert(model map[string]interface{}, table string, db_type string) (string, []interface{}, error)
return sql, params array, error
func SqlxUpdate ¶
func SqlxUpdate(model map[string]interface{}, table string, db_type string) (string, []interface{}, error)
return sql, params array, error
func UpdateOrInsert ¶
1 = insert, 2 = update
Types ¶
type ModelDeletable ¶
Click to show internal directories.
Click to hide internal directories.