Documentation
¶
Index ¶
- func ExpressionToBSON(criteria expression.Expression) bson.M
- type Iterator
- type Server
- 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 expression.Expression, options ...option.Option) (data.Iterator, *derp.Error)
- func (s Session) Load(collection string, criteria expression.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(criteria expression.Expression) bson.M
ExpressionToBSON converts a data.Expression value into pure bson.
Types ¶
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 Server ¶ added in v0.3.6
type Server struct {
// contains filtered or unexported fields
}
Server is an abstract representation of a MongoDB database. It implements the data.Server interface, so that it should be usable anywhere that requires a data.Server.
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 expression.Expression, options ...option.Option) (data.Iterator, *derp.Error)
List retrieves a group of objects from the database
func (Session) Load ¶
func (s Session) Load(collection string, criteria expression.Expression, target data.Object) *derp.Error
Load retrieves a single object from the database
Click to show internal directories.
Click to hide internal directories.