Documentation ¶
Index ¶
- func CheckExist(model interface{}, query string, args interface{}, ex *exception.Error)
- func CheckExistByKey(model interface{}, val interface{}, ex *exception.Error)
- func GetList(model interface{}, cols string, where map[string]interface{}, size int, ...)
- func GetMap(model interface{}, cols string, where map[string]interface{}) map[string]interface{}
- func GetMaps(model interface{}, cols string, where map[string]interface{}, size int, ...) []map[string]interface{}
- func GetRowByKey(model interface{}, cols string, val interface{}, ex *exception.Error)
- func IsExist(model interface{}, query string, args interface{}) bool
- func IsExistByKey(model interface{}, val interface{}) bool
- type DefaultModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExist ¶
通过条件判断是否存在数据(抛异常)
func CheckExistByKey ¶
通过主键值是否存在数据(抛异常)
func GetRowByKey ¶
func IsExistByKey ¶
func IsExistByKey(model interface{}, val interface{}) bool
通过主键值是否存在数据(返回boolean)
Types ¶
type DefaultModel ¶
type DefaultModel struct { ID int64 `db:"column:id;primaryKey;autoIncrease;"` AddTime int64 `db:"column:add_time;autoCreateTime:milli"` ModTime int64 `db:"column:mod_time;autoUpdateTime:milli"` }
func (*DefaultModel) GetRow ¶
func (db *DefaultModel) GetRow(where interface{})
func (*DefaultModel) IsExistById ¶
func (db *DefaultModel) IsExistById(val interface{})
func (DefaultModel) TableName ¶
func (DefaultModel) TableName() string
Click to show internal directories.
Click to hide internal directories.