Documentation ¶
Index ¶
- Constants
- func Delete(sql string, param map[string]interface{}, cacheSql bool) error
- func Insert(sql string, param map[string]interface{}, cacheSql bool) error
- func ParseSql(sql string, param map[string]interface{}) (string, []interface{})
- func SelectList(sql string, param map[string]interface{}, callback func(db *gorm.DB), ...)
- func SelectOne(sql string, param map[string]interface{}, callback func(db *gorm.DB), ...)
- func Update(sql string, param map[string]interface{}, cacheSql bool) error
Constants ¶
View Source
const ( Cache_sqlite = "sqlite" Cache_mysql = "local" )
Variables ¶
This section is empty.
Functions ¶
func ParseSql ¶
* 解析sql 引擎
`select * count from host_group t where 1=1 $if name != '' then and t.name = #name# $endif $if name != '' then and t.name = #name# $endif
func SelectList ¶
func SelectList(sql string, param map[string]interface{}, callback func(db *gorm.DB), cacheSql bool)
* 封装 查询列表
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.