Documentation ¶
Index ¶
- func Count(i interface{}, m bson.M) int
- func DbClean()
- func DbClose()
- func DbOpen(ip, name string) (err error)
- func DbTest() (err error)
- func Find(i interface{}) error
- func FindM(i interface{}, m bson.M, fields ...string) error
- func LogDev()
- func LogInit(file string)
- func Query(i interface{}, r interface{}, m bson.M, fields ...string) error
- func Remove(i interface{}) error
- func Save(i interface{}) error
- func SliceRemove(slice, element interface{})
- func SplitAfter(s string, sep []string) []string
- type Obj
- func (o *Obj) Count(i interface{}, m bson.M) int
- func (o *Obj) Find(i interface{}) error
- func (o *Obj) FindM(i interface{}, m bson.M, fields ...string) error
- func (o *Obj) Query(list interface{}, m bson.M, fields ...string) error
- func (o *Obj) Remove(i interface{}) error
- func (o *Obj) Save(i interface{}) error
- type Params
- type Selecter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Obj ¶
type Obj struct { // 数据库名称 Name string // 包含创建时间 Ca bool // 包含修改时间 Ua bool // 包含删除时间 Ra bool // bson.ObjectsId字段 Ids []string }
数据库对象
type Params ¶
type Params struct { // 页码从1开始 Page int // 每页大小 Count int // 排序 Sorting []string // 过滤 Filter map[string]interface{} }
查询参数
Click to show internal directories.
Click to hide internal directories.