mongodb

package
v1.0.0-...-e80de26 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

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

MongoDB store backed by MongoDB

func (*MongoDB) Commit

func (mdb *MongoDB) Commit(its []*x.Instruction) error

Commit inserts the instructions into the collection as documents

func (*MongoDB) GetEntity

func (mdb *MongoDB) GetEntity(subject string) (result []x.Instruction, err error)

GetEntity retrieves all documents matching the subject identifier

func (*MongoDB) Init

func (mdb *MongoDB) Init(args ...string)

Init setup a new collection using the name provided

func (*MongoDB) IsNew

func (mdb *MongoDB) IsNew(subject string) bool

IsNew checks if the supplied subject identifier exists in the collection

func (*MongoDB) Iterate

func (mdb *MongoDB) Iterate(fromId string, num int, ch chan x.Entity) (found int, last x.Entity, err error)

Jump to

Keyboard shortcuts

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