Versions in this module Expand all Collapse all v1 v1.0.1 Apr 27, 2023 v1.0.0 Apr 26, 2023 Changes in this version + type Collection struct + func NewCollection(cl *mongo.Collection) *Collection + func (c *Collection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*Cursor, error) + func (c *Collection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error) + func (c *Collection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) + func (c *Collection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) + func (c *Collection) Distinct(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error) + func (c *Collection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*Cursor, error) + func (c *Collection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *SingleResult + func (c *Collection) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error) + func (c *Collection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) + func (c *Collection) UpdateMany(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + func (c *Collection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + type Cursor struct + func (cr *Cursor) All(ctx context.Context, results interface{}) error + func (cr *Cursor) Close(ctx context.Context) error + func (cr *Cursor) Decode(v interface{}) error + func (cr *Cursor) Err() error + func (cr *Cursor) Next(ctx context.Context) bool + func (cr *Cursor) TryNext(ctx context.Context) bool + type SingleResult struct + func (msr *SingleResult) Decode(v interface{}) error + func (msr *SingleResult) Err() error