Documentation ¶
Index ¶
- Variables
- type DriverMongo
- func (driver *DriverMongo) Delete(context context.Context, filter interface{}) (int64, error)
- func (driver *DriverMongo) DeleteOne(context context.Context, filter interface{}) error
- func (driver *DriverMongo) Find(context context.Context, criteria interface{}) ([]byte, error)
- func (driver *DriverMongo) FindOne(context context.Context, filter interface{}) ([]byte, error)
- func (driver *DriverMongo) Insert(context context.Context, documents []interface{}) ([]byte, error)
- func (driver *DriverMongo) InsertOne(contex context.Context, document interface{}) ([]byte, error)
- func (driver *DriverMongo) Update(context context.Context, filter, documents interface{}) error
- func (driver *DriverMongo) UpdateOne(context context.Context, filter, update interface{}) error
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)
Click to show internal directories.
Click to hide internal directories.