Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bulk ¶
type Bulk interface { Insert(docs ...interface{}) Remove(selectors ...interface{}) RemoveAll(selectors ...interface{}) Run() (*BulkResult, error) Unordered() Update(pairs ...interface{}) UpdateAll(pairs ...interface{}) Upsert(pairs ...interface{}) }
type BulkResult ¶
type BulkResult = mgo.BulkResult
type ChangeInfo ¶
type ChangeInfo = mgo.ChangeInfo
type Collection ¶
type Collection interface { Bulk() Bulk Count() (n int, err error) Create(info *CollectionInfo) error DropAllIndexes() error DropCollection() error DropIndex(key ...string) error DropIndexName(name string) error EnsureIndex(index Index) error EnsureIndexKey(key ...string) error Find(query interface{}) Query FindId(id interface{}) Query Indexes() (indexes []Index, err error) Insert(docs ...interface{}) error // NewIter(session *Session, firstBatch []bson.Raw, cursorId int64, err error) *Iter // Pipe(pipeline interface{}) Pipe Remove(selector interface{}) error RemoveAll(selector interface{}) (info *ChangeInfo, err error) RemoveId(id interface{}) error Repair() Iter Update(selector interface{}, update interface{}) error UpdateAll(selector interface{}, update interface{}) (info *ChangeInfo, err error) UpdateId(id interface{}, update interface{}) error Upsert(selector interface{}, update interface{}) (info *ChangeInfo, err error) UpsertId(id interface{}, update interface{}) (info *ChangeInfo, err error) }
func WrapCollection ¶
func WrapCollection(c *mgo.Collection) Collection
type CollectionInfo ¶
type CollectionInfo = mgo.CollectionInfo
type Credential ¶
type Credential = mgo.Credential
type Database ¶
type Database interface { AddUser(username, password string, readOnly bool) error C(name string) Collection CollectionNames() (names []string, err error) CreateView(view string, source string, pipeline interface{}, collation *Collation) error DropDatabase() error FindRef(ref *DBRef) Query // GridFS(prefix string) *GridFS Login(user, pass string) error Logout() RemoveUser(user string) error Run(cmd interface{}, result interface{}) error UpsertUser(user *User) error }
func WrapDatabase ¶
type MapReduceInfo ¶
type MapReduceInfo = mgo.MapReduceInfo
type Query ¶
type Query interface { All(result interface{}) error Apply(change Change, result interface{}) (info *ChangeInfo, err error) Batch(n int) Query Collation(collation *Collation) Query Comment(comment string) Query Count() (n int, err error) Distinct(key string, result interface{}) error Explain(result interface{}) error For(result interface{}, f func() error) error Hint(indexKey ...string) Query Iter() Iter Limit(n int) Query LogReplay() Query MapReduce(job *MapReduce, result interface{}) (info *MapReduceInfo, err error) One(result interface{}) (err error) Prefetch(p float64) Query Select(selector interface{}) Query SetMaxScan(n int) Query SetMaxTime(d time.Duration) Query Skip(n int) Query Snapshot() Query Sort(fields ...string) Query Tail(timeout time.Duration) Iter }
type Session ¶
type Session interface { BuildInfo() (info BuildInfo, err error) Clone() Session Close() Copy() Session DB(name string) Database DatabaseNames() (names []string, err error) EnsureSafe(safe *Safe) FindRef(ref *DBRef) Query Fsync(async bool) error FsyncLock() error FsyncUnlock() error LiveServers() (addrs []string) Login(cred *Credential) error LogoutAll() Mode() Mode New() Session Ping() error Refresh() ResetIndexCache() Run(cmd interface{}, result interface{}) error Safe() (safe *Safe) SelectServers(tags ...bson.D) SetBatch(n int) SetBypassValidation(bypass bool) SetCursorTimeout(d time.Duration) SetMode(consistency Mode, refresh bool) SetPoolLimit(limit int) SetPoolTimeout(timeout time.Duration) SetPrefetch(p float64) SetSafe(safe *Safe) SetSocketTimeout(d time.Duration) SetSyncTimeout(d time.Duration) }
func WrapSession ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.