mongodb

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expression2BSON

func Expression2BSON(c data.Expression) bson.M

Types

type Datastore

type Datastore struct {
	// contains filtered or unexported fields
}

func New

func New(uri string, database string) Datastore

func (Datastore) Session

func (db Datastore) Session(ctx context.Context) data.Session

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (Session) Close

func (s Session) Close()

Close cleans up any remaining connections that need to be removed.

func (Session) Delete

func (s Session) Delete(collection string, object data.Object, note string) *derp.Error

Delete removes a single object from the database, using a "virtual delete"

func (Session) Load

func (s Session) Load(collection string, filter data.Expression, target data.Object) *derp.Error

Load retrieves a single object from the database

func (Session) Save

func (s Session) Save(collection string, object data.Object, note string) *derp.Error

Save inserts/updates a single object in the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL