Documentation ¶
Index ¶
- func AlterDoc(doc *M, operator string, operation M)
- func Convert(doc M, out interface{})
- func InArray(key string, arrays ...[]string) bool
- type BaseInterface
- type BaseModel
- type M
- type MConn
- func (self *MConn) Aggregate(table string, doc []M) *mgo.Pipe
- func (self *MConn) Count(table string, query M) int
- func (self *MConn) Delete(table string, query M) error
- func (self *MConn) DropIndex(table string, key ...string) error
- func (self *MConn) DropIndices(table string) error
- func (self *MConn) EnsureIndex(table string, index mgo.Index) error
- func (self *MConn) FindAndUpdate(table string, query M, doc M, result interface{}) error
- func (self *MConn) FindAndUpsert(table string, query M, doc M, result interface{}) error
- func (self *MConn) Get(table string, query M) *mgo.Iter
- func (self *MConn) GetCursor(table string, query M) *mgo.Query
- func (self *MConn) GetOne(table string, query M, result interface{}) error
- func (self *MConn) HintedCount(table string, query M, hint string) int
- func (self *MConn) HintedGetOne(table string, query M, result interface{}, hint string) error
- func (self *MConn) Insert(table string, arguments ...interface{}) (_id string)
- func (self *MConn) InsertMulti(table string, docs ...M) error
- func (self *MConn) InternalConn() *mgo.Database
- func (self *MConn) MapReduce(table string, query M, result interface{}, job *MapReduce) (*mgo.MapReduceInfo, error)
- func (self *MConn) ScopeCheck()
- func (self *MConn) Update(table string, query M, doc M) error
- func (self *MConn) Upsert(table string, query M, doc M) error
- type MapReduce
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseInterface ¶
type BaseInterface interface {
PrepareSave(conn *MConn)
}
type BaseModel ¶
type BaseModel struct { Id bson.ObjectId `json:"_id,omitempty" bson:"_id" required:"true"` CreatedOn int64 `json:"created_on" bson:"created_on" required:"true"` ModifiedOn int64 `json:"updated_on" bson:"updated_on" required:"true"` }
func (*BaseModel) PrepareSave ¶
type MConn ¶
type MConn struct {
// contains filtered or unexported fields
}
var DbConnection *MConn
func (*MConn) DropIndices ¶
func (*MConn) EnsureIndex ¶
func (*MConn) FindAndUpdate ¶
func (*MConn) FindAndUpsert ¶
func (*MConn) HintedGetOne ¶
func (*MConn) InternalConn ¶
func (self *MConn) InternalConn() *mgo.Database
func (*MConn) ScopeCheck ¶
func (self *MConn) ScopeCheck()
Click to show internal directories.
Click to hide internal directories.