Documentation ¶
Index ¶
- Variables
- func Close(addrs string)
- func CloseAll()
- func Define(c *Collection)
- type Collection
- type Dao
- type Database
- type Item
- type Kip
- type OnCreate
- type Patch
- type Query
- func (q *Query) All(result interface{}) error
- func (q *Query) Count() (n int, err error)
- func (q *Query) ForEach(f func(*Item)) error
- func (q *Query) Iter() (*mgo.Iter, *Database)
- func (q *Query) Limit(n int) *Query
- func (q *Query) One(result interface{}) error
- func (q *Query) Select(projection interface{}) *Query
- func (q *Query) Skip(n int) *Query
- func (q *Query) Snapshot() *Query
- func (q *Query) Sort(fields ...string) *Query
Constants ¶
This section is empty.
Variables ¶
View Source
var MONGO_DIAL_TIMEOUT = 0 * time.Second
View Source
var MONGO_SOCKET_TIMEOUT = 3 * time.Second
View Source
var MONGO_SYNC_TIMEOUT = 3 * time.Second
Functions ¶
func Define ¶
func Define(c *Collection)
Types ¶
type Collection ¶
type Dao ¶
type Dao struct { Collection *Collection Database *Database }
Dao is the combination of `Collection` definition plus a `Database`
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
type Item ¶
type Item struct { Dao *Dao Value interface{} // contains filtered or unexported fields }
type Kip ¶
type Kip struct {
// contains filtered or unexported fields
}
func (*Kip) Define ¶
func (k *Kip) Define(c *Collection)
Click to show internal directories.
Click to hide internal directories.