Documentation
¶
Index ¶
- Variables
- type MgoDB
- func (my *MgoDB) CountWithCond(cName string, cond interface{}) (int, error)
- func (my *MgoDB) FakeDel(cName string, data interface{}) bool
- func (my *MgoDB) GetPage(cName string, page int, size int) ([]interface{}, error)
- func (my *MgoDB) HowMany(cName string) (int, error)
- func (my *MgoDB) Insert(cName string, data ...interface{}) error
- func (my *MgoDB) Search(cName string, q interface{}, page int, size int) ([]interface{}, error)
- func (my *MgoDB) SearchAll(cName string, q interface{}) ([]interface{}, error)
- func (my *MgoDB) SearchOne(cName, id string) (interface{}, error)
- func (my *MgoDB) Update(cName string, where, modify interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MDB_URL string = ":27017"
)
Functions ¶
This section is empty.
Types ¶
type MgoDB ¶
type MgoDB struct { Url string `json:"url"` DbName string `json:"db_name"` *mgo.Session *mgo.Database }
MgoDB 数据库结构体
func (*MgoDB) CountWithCond ¶
CountWithCond ...
Click to show internal directories.
Click to hide internal directories.