mongodb

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageIndexMongo = tingyun3.StorageIndexMongo
)

Variables

This section is empty.

Functions

func WrapmongodbAggregate

func WrapmongodbAggregate(coll *mongo.Collection, ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)

func WrapmongodbBulkWrite

func WrapmongodbBulkWrite(coll *mongo.Collection, ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)

func WrapmongodbCountDocuments

func WrapmongodbCountDocuments(coll *mongo.Collection, ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)

func WrapmongodbDeleteMany

func WrapmongodbDeleteMany(coll *mongo.Collection, ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)

func WrapmongodbDeleteOne

func WrapmongodbDeleteOne(coll *mongo.Collection, ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)

func WrapmongodbDisconnect

func WrapmongodbDisconnect(c *mongo.Client, ctx context.Context) error

func WrapmongodbDistinct

func WrapmongodbDistinct(coll *mongo.Collection, ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)

func WrapmongodbDrop

func WrapmongodbDrop(coll *mongo.Collection, ctx context.Context) error

func WrapmongodbEstimatedDocumentCount

func WrapmongodbEstimatedDocumentCount(coll *mongo.Collection, ctx context.Context, opts ...*options.EstimatedDocumentCountOptions) (int64, error)

func WrapmongodbFind

func WrapmongodbFind(coll *mongo.Collection, ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)

func WrapmongodbFindOne

func WrapmongodbFindOne(coll *mongo.Collection, ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult

func WrapmongodbFindOneAndDelete

func WrapmongodbFindOneAndDelete(coll *mongo.Collection, ctx context.Context, filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult

func WrapmongodbFindOneAndReplace

func WrapmongodbFindOneAndReplace(coll *mongo.Collection, ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) *mongo.SingleResult

func WrapmongodbFindOneAndUpdate

func WrapmongodbFindOneAndUpdate(coll *mongo.Collection, ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult

func WrapmongodbInsertMany

func WrapmongodbInsertMany(coll *mongo.Collection, ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)

func WrapmongodbInsertOne

func WrapmongodbInsertOne(coll *mongo.Collection, ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)

func WrapmongodbNewClient

func WrapmongodbNewClient(opts ...*options.ClientOptions) (*mongo.Client, error)

func WrapmongodbReplaceOne

func WrapmongodbReplaceOne(coll *mongo.Collection, ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)

func WrapmongodbUpdateByID

func WrapmongodbUpdateByID(coll *mongo.Collection, ctx context.Context, id interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

func WrapmongodbUpdateMany

func WrapmongodbUpdateMany(coll *mongo.Collection, ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

func WrapmongodbUpdateOne

func WrapmongodbUpdateOne(coll *mongo.Collection, ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

func WrapmongodbWatch

func WrapmongodbWatch(coll *mongo.Collection, ctx context.Context, pipeline interface{}, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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