mongodb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: NCSA Imports: 18 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = &mongodbConfig{
		done: make(chan struct{}),
	}
)

Config ...

Functions

func NewDatabase

func NewDatabase(databaseName string, opts ...database.Option) (database.Database, error)

NewDatabase ...

func NewTable

func NewTable(db database.Database, tableName string) (database.Table, error)

NewTable ...

Types

type MongoTable

type MongoTable struct {
	Session db.Database
	// contains filtered or unexported fields
}

func (*MongoTable) Create

func (tbl *MongoTable) Create(e interface{}) error

Create ...

func (*MongoTable) Delete

func (tbl *MongoTable) Delete() error

Delete ...

func (*MongoTable) Exists

func (tbl *MongoTable) Exists() bool

func (*MongoTable) Find

func (tbl *MongoTable) Find(q interface{}, skip int, limit int, result interface{}) (err error)

func (*MongoTable) FindAll

func (tbl *MongoTable) FindAll(q interface{}, result interface{}) error

func (*MongoTable) FindOne

func (tbl *MongoTable) FindOne(q interface{}, result interface{}) error

func (*MongoTable) Insert

func (tbl *MongoTable) Insert(elem interface{}) error

Insert ...

func (*MongoTable) Name

func (tbl *MongoTable) Name() string

Name ...

Jump to

Keyboard shortcuts

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