Documentation ¶
Index ¶
- Constants
- type Dao
- func (dao *Dao) Count(tableName string, count *int, query *model.QueryParam) bool
- func (dao *Dao) Create(tableName string, data interface{}) bool
- func (d *Dao) CreateUser(data *model.User) bool
- func (dao *Dao) Delete(tableName string, data interface{}, query *model.QueryParam) bool
- func (dao *Dao) DeleteById(tableName string, data interface{}) bool
- func (d *Dao) DeleteUser(id uint64) bool
- func (dao *Dao) FindById(tableName string, data interface{}, id interface{}) bool
- func (dao *Dao) FindMulti(tableName string, data interface{}, query *model.QueryParam) bool
- func (dao *Dao) FindOne(tableName string, data interface{}, query *model.QueryParam) bool
- func (d *Dao) FindUser(id uint64) (*model.User, bool)
- func (d *Dao) FindUserOne(query *model.QueryParam) (*model.User, bool)
- func (d *Dao) FindUserTotal(query *model.QueryParam) (int, bool)
- func (d *Dao) ListUser(query *model.QueryParam) ([]*model.User, bool)
- func (dao *Dao) Update(tableName string, data interface{}, query *model.QueryParam) bool
- func (d *Dao) UpdateUser(id uint64, data map[string]interface{}) bool
Constants ¶
View Source
const (
TableName = "user"
)
user 数据表
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
Dao 对象
func (*Dao) Delete ¶
func (dao *Dao) Delete(tableName string, data interface{}, query *model.QueryParam) bool
Delete 删除数据
func (*Dao) DeleteById ¶
DeleteById 更加ID删除数据
func (*Dao) FindMulti ¶ added in v0.1.1
func (dao *Dao) FindMulti(tableName string, data interface{}, query *model.QueryParam) bool
FindMulti 数据复合查询
func (*Dao) FindOne ¶ added in v0.1.1
func (dao *Dao) FindOne(tableName string, data interface{}, query *model.QueryParam) bool
FindOne 根据某一字段查询数据
func (*Dao) FindUserOne ¶ added in v0.1.1
FindUserOne 根据用户某一条件,获取用户数据
func (*Dao) FindUserTotal ¶ added in v0.1.1
func (d *Dao) FindUserTotal(query *model.QueryParam) (int, bool)
FindUserTotal 根据用户某一条件,统计用户数据条数
Click to show internal directories.
Click to hide internal directories.