Documentation
¶
Index ¶
- func ExpressionToBSON(c data.Expression) bson.M
- type Datastore
- type Iterator
- type Session
- func (s Session) Close()
- func (s Session) Delete(collection string, object data.Object, note string) *derp.Error
- func (s Session) List(collection string, criteria data.Expression, sort []string) (data.Iterator, *derp.Error)
- func (s Session) Load(collection string, criteria data.Expression, target data.Object) *derp.Error
- func (s Session) Save(collection string, object data.Object, note string) *derp.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpressionToBSON ¶ added in v0.2.0
func ExpressionToBSON(c data.Expression) bson.M
ExpressionToBSON converts a data.Expression value into pure bson.
Types ¶
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore is an abstract representation of a MongoDB database. It implements the data.Datastore interface, so that it should be usable anywhere that requires a data.Datastore.
type Iterator ¶ added in v0.2.5
Iterator wraps the mongodb Cursor object
func NewIterator ¶ added in v0.2.5
NewIterator returns a fully populated Iterator object
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents a single database session, such as a session encompassing all of the database queries to respond to a single REST service call.
func (Session) Close ¶
func (s Session) Close()
Close cleans up any remaining connections that need to be removed.
func (Session) List ¶ added in v0.2.5
func (s Session) List(collection string, criteria data.Expression, sort []string) (data.Iterator, *derp.Error)
List retrieves a group of objects from the database
Click to show internal directories.
Click to hide internal directories.