mongo

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionNames

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

func Count

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

func DropDatabase

func DropDatabase(db string) error

func EnsureIndex

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

func FindAll

func FindAll(db, collection string, query interface{}, other *conf.Other) ([]bson.M, error)

func FindOne

func FindOne(db, collection string, query interface{}, other *conf.Other, result interface{}) error

func FindPage

func FindPage(db, collection string, other *conf.Other, query interface{}) ([]bson.M, error)

func Indexes

func Indexes(db, collection string) []bson.M

func Insert

func Insert(db, collection string, doc interface{}) (*mongo.InsertOneResult, error)

func IsEmpty

func IsEmpty(db, collection string) bool

func New added in v1.1.14

func New(command_uri string) error

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, where, update interface{}, other *conf.Other) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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