mongo

package
v1.1.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser added in v1.0.1

func AddUser(db string, username string, password string, readOnly bool) error

func CollectionNames added in v1.0.1

func CollectionNames(db string) ([]string, error)

func Count

func Count(db, collection string, query interface{}) (int, error)

func DropDatabase added in v1.0.1

func DropDatabase(db string) error

func EnsureIndex added in v1.0.1

func EnsureIndex(db, collection string, selector []string) error

func FindAll

func FindAll(db, collection string, query, selector, result interface{}) error

func FindOne

func FindOne(db, collection string, query, selector, result interface{}) error

func FindPage

func FindPage(db, collection string, page, limit int, query, selector, result interface{}) error

func Indexes added in v1.0.1

func Indexes(db, collection string) ([]mgo.Index, error)

func Insert

func Insert(db, collection string, doc interface{}) error

func IsEmpty

func IsEmpty(db, collection string) bool

func Remove

func Remove(db, collection string, selector interface{}) error

func RemoveAll

func RemoveAll(db, collection string, selector interface{}) error

func Update

func Update(db, collection string, selector, update interface{}) error

func UpdateAll

func UpdateAll(db, collection string, selector, update interface{}) error

func Upsert

func Upsert(db, collection string, selector, update interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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