Documentation
¶
Index ¶
- Variables
- func GetDb() string
- func Init(cfg *config.MongoDbConfig) bool
- func MAdd(db, collection string, dest interface{}) bool
- func MCount(db, collection string, selector bson.M) uint64
- func MFindList(db, collection string, selector bson.M, destList interface{}) bool
- func MFindOne(db, collection string, selector bson.M, dest interface{}) bool
- func MFindPageList(db, collection string, skip, limit int, selector bson.M, destList interface{}, ...) bool
- func MFindSortPageList(db, collection string, skip, limit int, selector bson.M, destList interface{}, ...) bool
- func MRemove(db, collection string, selector bson.M) bool
- func MSave(db, collection string, selector, update bson.M) bool
- func MUpdate(db, collection string, selector, update bson.M) bool
- func Release()
- type DbDaoMongoSupport
- func (db DbDaoMongoSupport) CountList(query interface{}) uint64
- func (db DbDaoMongoSupport) DelData(query interface{}) int64
- func (db DbDaoMongoSupport) InsertOne(dest interface{}) int64
- func (db DbDaoMongoSupport) SelectList(query interface{}, skip, limit int, sort ...string) interface{}
- func (db DbDaoMongoSupport) SelectOne(query interface{}) interface{}
- func (db DbDaoMongoSupport) UpdateList(query interface{}, update interface{}) int64
- func (db DbDaoMongoSupport) UpdateOne(dest interface{}) int64
- type MgServerConfig
- type Query
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDb string
Functions ¶
func Init ¶
func Init(cfg *config.MongoDbConfig) bool
func MFindPageList ¶
func MFindPageList(db, collection string, skip, limit int, selector bson.M, destList interface{}, sort ...string) bool
MFindPageList 分页查找数据列表
Types ¶
type DbDaoMongoSupport ¶
type DbDaoMongoSupport struct { }
func (DbDaoMongoSupport) CountList ¶
func (db DbDaoMongoSupport) CountList(query interface{}) uint64
func (DbDaoMongoSupport) DelData ¶
func (db DbDaoMongoSupport) DelData(query interface{}) int64
func (DbDaoMongoSupport) InsertOne ¶
func (db DbDaoMongoSupport) InsertOne(dest interface{}) int64
func (DbDaoMongoSupport) SelectList ¶
func (db DbDaoMongoSupport) SelectList(query interface{}, skip, limit int, sort ...string) interface{}
func (DbDaoMongoSupport) SelectOne ¶
func (db DbDaoMongoSupport) SelectOne(query interface{}) interface{}
func (DbDaoMongoSupport) UpdateList ¶
func (db DbDaoMongoSupport) UpdateList(query interface{}, update interface{}) int64
func (DbDaoMongoSupport) UpdateOne ¶
func (db DbDaoMongoSupport) UpdateOne(dest interface{}) int64
type MgServerConfig ¶
Click to show internal directories.
Click to hide internal directories.