Versions in this module Expand all Collapse all v1 v1.0.4 Jul 21, 2021 v1.0.3 Nov 12, 2019 v1.0.2 Nov 7, 2019 v1.0.1 Jun 10, 2019 v1.0.0 Jan 18, 2019 Changes in this version + var ErrCursor = mgo.ErrCursor + var ErrNotFound = mgo.ErrNotFound + func IsDup(err error) bool + type BulkResult struct + Matched int + Modified int + type Change struct + Remove bool + ReturnNew bool + Update interface{} + Upsert bool + type ChangeInfo struct + Matched int + Removed int + Updated int + UpsertedId interface{} + type CollectionInfo struct + Capped bool + DisableIdIndex bool + ForceIdIndex bool + MaxBytes int + MaxDocs int + StorageEngine interface{} + ValidationAction string + ValidationLevel string + Validator interface{} + type IBulk interface + Insert func(docs ...interface{}) IBulk + Remove func(selectors ...interface{}) IBulk + RemoveAll func(selectors ...interface{}) IBulk + Run func() (*BulkResult, error) + Unordered func() IBulk + Update func(pairs ...interface{}) IBulk + UpdateAll func(pairs ...interface{}) IBulk + Upsert func(pairs ...interface{}) IBulk + func NewBulk(col ...ICollection) IBulk + type ICollection interface + Bulk func() IBulk + C func() *mgo.Collection + Count func() (n int, err error) + Create func(info *CollectionInfo) error + Database func() IDatabase + DropCollection func() error + DropIndexByKeys func(key ...string) error + EnsureIndex func(index Index) error + EnsureIndexKey func(key ...string) error + Find func(query interface{}) IQuery + FindId func(id interface{}) IQuery + FullName func() string + Indexes func() (indexes []Index, err error) + Name func() string + NewIter func(session ISession, firstBatch []bson.Raw, cursorId int64, err error) IIter + Pipe func(pipeline interface{}) IPipe + Remove func(selector interface{}) error + RemoveAll func(selector interface{}) (info *ChangeInfo, err error) + RemoveId func(id interface{}) error + Repair func() IIter + Update func(selector interface{}, update interface{}) error + UpdateAll func(selector interface{}, update interface{}) (info *ChangeInfo, err error) + UpdateId func(id interface{}, update interface{}) error + Upsert func(selector interface{}, update interface{}) (info *ChangeInfo, err error) + UpsertId func(id interface{}, update interface{}) (info *ChangeInfo, err error) + With func(s ISession) ICollection + type IDatabase interface + AddUser func(username, password string, readOnly bool) error + C func(name string) ICollection + Collection func(name string) ICollection + CollectionNames func() (names []string, err error) + DB func() *mgo.Database + DropDatabase func() error + FindRef func(ref *mgo.DBRef) IQuery + GridFS func(prefix string) *mgo.GridFS + Login func(user, pass string) error + Logout func() + Name func() string + RemoveUser func(user string) error + Session func() ISession + UpsertUser func(user *mgo.User) error + func FromDB(db *mgo.Database) IDatabase + type IIter interface + All func(result interface{}) error + Close func() error + Done func() bool + Err func() error + For func(result interface{}, f func() error) (err error) + Next func(result interface{}) bool + Timeout func() bool + type IPipe interface + All func(result interface{}) error + AllowDiskUse func() IPipe + Batch func(n int) IPipe + Explain func(result interface{}) error + Iter func() IIter + One func(result interface{}) error + P func() *mgo.Pipe + func NewPipe(p ...*mgo.Pipe) IPipe + type IQuery interface + Apply func(change Change, result interface{}) (info *ChangeInfo, err error) + Batch func(n int) IQuery + Comment func(comment string) IQuery + Explain func(result interface{}) error + Hint func(indexKey ...string) IQuery + Iter func() IIter + LogReplay func() IQuery + MapReduce func(job *MapReduce, result interface{}) (info *MapReduceInfo, err error) + Prefetch func(p float64) IQuery + Q func() *mgo.Query + SetMaxScan func(n int) IQuery + SetMaxTime func(d time.Duration) IQuery + Snapshot func() IQuery + Tail func(timeout time.Duration) IIter + type ISession interface + BuildInfo func() (info mgo.BuildInfo, err error) + Clone func() ISession + Close func() + Copy func() ISession + DB func(name string) IDatabase + DatabaseNames func() (names []string, err error) + EnsureSafe func(safe *mgo.Safe) + FindRef func(ref *mgo.DBRef) IQuery + Fsync func(async bool) error + FsyncLock func() error + FsyncUnlock func() error + LiveServers func() (addrs []string) + Login func(cred *mgo.Credential) error + LogoutAll func() + Mode func() mgo.Mode + New func() ISession + Ping func() error + Refresh func() + ResetIndexCache func() + Run func(cmd interface{}, result interface{}) error + S func() *mgo.Session + Safe func() (safe *mgo.Safe) + SelectServers func(tags ...bson.D) + SetBatch func(n int) + SetBypassValidation func(bypass bool) + SetCursorTimeout func(d time.Duration) + SetDefaultSafe func() + SetMode func(consistency mgo.Mode, refresh bool) + SetPoolLimit func(limit int) + SetPrefetch func(p float64) + SetSafe func(safe *mgo.Safe) + SetSocketTimeout func(d time.Duration) + SetSyncTimeout func(d time.Duration) + func Dial(cfg *dbx.DbConfig) (ISession, error) + func DialWithInfo(info *mgo.DialInfo) (ISession, error) + func DialWithTimeout(url string, timeout time.Duration) (ISession, error) + func NewSession(s ...*mgo.Session) ISession + type Index struct + Background bool + Bits int + BucketSize float64 + Collation *mgo.Collation + DefaultLanguage string + DropDups bool + ExpireAfter time.Duration + Key []string + LanguageOverride string + Max int + Maxf float64 + Min int + Minf float64 + Name string + Sparse bool + Unique bool + Weights map[string]int + type MapReduce struct + Finalize string + Map string + Out interface{} + Reduce string + Scope interface{} + Verbose bool + type MapReduceInfo struct + Collection string + Database string + EmitCount int + InputCount int + OutputCount int + Time int64 + VerboseTime *mgo.MapReduceTime + type MapReduceTime struct + EmitLoop int64 + Map int64 + Total int64