Documentation ¶
Index ¶
- func Find[T any](ctx context.Context, c *mongo.Collection, filter typed.Filter, ...) ([]*T, error)
- func FindOne[T any](ctx context.Context, c *mongo.Collection, filter typed.Filter, ...) (*T, error)
- func FindOneAndUpdate[T any](ctx context.Context, c *mongo.Collection, m *typed.FindOneAndUpdate, ...) (*T, error)
- func InsertMany[T any](ctx context.Context, c *mongo.Collection, docs []*T) ([]primitive.ObjectID, error)
- func InsertOne[T any](ctx context.Context, c *mongo.Collection, doc T) (primitive.ObjectID, error)
- func UpdateById[T any](ctx context.Context, c *mongo.Collection, m *typed.UpdateById, ...) (*mongo.UpdateResult, error)
- func UpdateMany[T any](ctx context.Context, c *mongo.Collection, m *typed.UpdateMany, ...) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Find ¶
func Find[T any](ctx context.Context, c *mongo.Collection, filter typed.Filter, opts ...*options.FindOptions) ([]*T, error)
func FindOne ¶
func FindOne[T any](ctx context.Context, c *mongo.Collection, filter typed.Filter, opts ...*options.FindOneOptions) (*T, error)
func FindOneAndUpdate ¶
func FindOneAndUpdate[T any](ctx context.Context, c *mongo.Collection, m *typed.FindOneAndUpdate, opts ...*options.FindOneAndUpdateOptions) (*T, error)
func InsertMany ¶ added in v0.0.4
func UpdateById ¶
func UpdateById[T any](ctx context.Context, c *mongo.Collection, m *typed.UpdateById, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func UpdateMany ¶
func UpdateMany[T any](ctx context.Context, c *mongo.Collection, m *typed.UpdateMany, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.