Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TypedCollection ¶ added in v0.0.3
type TypedCollection[D any] interface { FindOne(ctx context.Context, filter model.Filter, opts ...*options.FindOneOptions) (*D, error) Find(ctx context.Context, filter model.Filter, opts ...*options.FindOptions) ([]*D, error) FindByDocIds(ctx context.Context, ids []primitive.ObjectID, opts ...*options.FindOptions) ([]*D, error) InsertOne(ctx context.Context, doc D) (primitive.ObjectID, error) InsertMany(ctx context.Context, docs []*D) ([]primitive.ObjectID, error) FindOneAndUpdate(ctx context.Context, m *model.FindOneAndUpdate, opts ...*options.FindOneAndUpdateOptions) (*D, error) UpdateMany(ctx context.Context, m *model.UpdateMany, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) UpdateById(ctx context.Context, m *model.UpdateById, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) }
func NewTypedCollection ¶ added in v0.0.3
func NewTypedCollection[D any](db *mongo.Database, name string, opts ...*options.CollectionOptions) TypedCollection[D]
Click to show internal directories.
Click to hide internal directories.