drivermongo

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: LGPL-2.1 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCastObjectID = errors.New("Cast primitive ObjectID insert one failed.")
)

Functions

This section is empty.

Types

type DriverMongo

type DriverMongo struct {
	Client     *stdmongo.Client
	Collection *stdmongo.Collection
}

func (*DriverMongo) Delete

func (driver *DriverMongo) Delete(context context.Context, filter interface{}) (int64, error)

func (*DriverMongo) DeleteOne

func (driver *DriverMongo) DeleteOne(context context.Context, filter interface{}) error

func (*DriverMongo) Find

func (driver *DriverMongo) Find(context context.Context, criteria interface{}) ([]byte, error)

func (*DriverMongo) FindOne

func (driver *DriverMongo) FindOne(context context.Context, filter interface{}) ([]byte, error)

func (*DriverMongo) Insert

func (driver *DriverMongo) Insert(context context.Context, documents []interface{}) ([]byte, error)

func (*DriverMongo) InsertOne

func (driver *DriverMongo) InsertOne(contex context.Context, document interface{}) ([]byte, error)

func (*DriverMongo) Update

func (driver *DriverMongo) Update(context context.Context, filter, documents interface{}) error

func (*DriverMongo) UpdateOne

func (driver *DriverMongo) UpdateOne(context context.Context, filter, update interface{}) error

Jump to

Keyboard shortcuts

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