Documentation ¶
Index ¶
- func Aggregate[T any](ctx context.Context, coll *mongo.Collection, pipeline any, ...) ([]T, error)
- func Count(ctx context.Context, coll *mongo.Collection, filter any, ...) (int64, error)
- func DecodeOne[T any](decoder func(v any) error) (res T, err error)
- func Decodes[T any](ctx context.Context, cur *mongo.Cursor) ([]T, error)
- func DeleteMany(ctx context.Context, coll *mongo.Collection, filter any, ...) error
- func DeleteOne(ctx context.Context, coll *mongo.Collection, filter any, ...) error
- func Exist(ctx context.Context, coll *mongo.Collection, filter any, ...) (bool, error)
- func Find[T any](ctx context.Context, coll *mongo.Collection, filter any, ...) ([]T, error)
- func FindOne[T any](ctx context.Context, coll *mongo.Collection, filter any, ...) (res T, err error)
- func FindOneAndUpdate[T any](ctx context.Context, coll *mongo.Collection, filter any, update any, ...) (res T, err error)
- func FindPage[T any](ctx context.Context, coll *mongo.Collection, filter any, ...) (int64, []T, error)
- func FindPageOnly[T any](ctx context.Context, coll *mongo.Collection, filter any, ...) ([]T, error)
- func InsertMany[T any](ctx context.Context, coll *mongo.Collection, val []T, ...) error
- func UpdateMany(ctx context.Context, coll *mongo.Collection, filter any, update any, ...) (*mongo.UpdateResult, error)
- func UpdateOne(ctx context.Context, coll *mongo.Collection, filter any, update any, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶
func Aggregate[T any](ctx context.Context, coll *mongo.Collection, pipeline any, opts ...*options.AggregateOptions) ([]T, error)
func Count ¶
func Count(ctx context.Context, coll *mongo.Collection, filter any, opts ...*options.CountOptions) (int64, error)
func DeleteMany ¶
func DeleteMany(ctx context.Context, coll *mongo.Collection, filter any, opts ...*options.DeleteOptions) error
func DeleteOne ¶
func DeleteOne(ctx context.Context, coll *mongo.Collection, filter any, opts ...*options.DeleteOptions) error
func Exist ¶
func Exist(ctx context.Context, coll *mongo.Collection, filter any, opts ...*options.CountOptions) (bool, error)
func Find ¶
func Find[T any](ctx context.Context, coll *mongo.Collection, filter any, opts ...*options.FindOptions) ([]T, error)
func FindOne ¶
func FindOne[T any](ctx context.Context, coll *mongo.Collection, filter any, opts ...*options.FindOneOptions) (res T, err error)
func FindOneAndUpdate ¶ added in v0.0.35
func FindOneAndUpdate[T any](ctx context.Context, coll *mongo.Collection, filter any, update any, opts ...*options.FindOneAndUpdateOptions) (res T, err error)
func FindPage ¶
func FindPage[T any](ctx context.Context, coll *mongo.Collection, filter any, pagination pagination.Pagination, opts ...*options.FindOptions) (int64, []T, error)
func FindPageOnly ¶
func FindPageOnly[T any](ctx context.Context, coll *mongo.Collection, filter any, pagination pagination.Pagination, opts ...*options.FindOptions) ([]T, error)
func InsertMany ¶
func InsertMany[T any](ctx context.Context, coll *mongo.Collection, val []T, opts ...*options.InsertManyOptions) error
func UpdateMany ¶
func UpdateMany(ctx context.Context, coll *mongo.Collection, filter any, update any, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.