Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
Collection to show database and collection.
type QuerySet ¶
type QuerySet interface { Insert(docs ...interface{}) error Update(update interface{}) error UpdateAll(update interface{}) (info *mgo.ChangeInfo, err error) Upsert(update interface{}) (info *mgo.ChangeInfo, err error) Remove() error RemoveAll() (info *mgo.ChangeInfo, err error) All(result interface{}) error One(result interface{}) error Count() (int, error) Limit(n int) QuerySet Skip(n int) QuerySet Prefetch(p float64) QuerySet Sort(fields ...string) QuerySet }
QuerySet likes mgo.Query.
type Storage ¶
type Storage interface { Query(Collection) QuerySet Raw(Collection, bson.M) QuerySet }
Storage supply a interface for make Queryset.
func NewStorage ¶
NewStorage create a new mongodb storage.
Click to show internal directories.
Click to hide internal directories.