Documentation ¶
Index ¶
- func CreatePagination[TData any](coll *Coll[TData], token ct.CursorToken, fieldPrimary string, ...) ([]bson.D, error)
- type Coll
- func (c *Coll[TData]) Aggregate(ctx context.Context, pipeline mongo.Pipeline, ...) ([]TData, error)
- func (c *Coll[TData]) AggregateOneOpt(ctx context.Context, pipeline mongo.Pipeline, ...) (*TData, error)
- func (c *Coll[TData]) Collection() *mongo.Collection
- func (c *Coll[TData]) Count(ctx context.Context, filter ct.Filter) (int64, error)
- func (c *Coll[TData]) DeleteMany(ctx context.Context, filterQuery bson.M) (*mongo.DeleteResult, error)
- func (c *Coll[TData]) DeleteOne(ctx context.Context, filterQuery bson.M) error
- func (c *Coll[TData]) DeleteOneByID(ctx context.Context, id EntityID) error
- func (c *Coll[TData]) Drop(ctx context.Context) error
- func (c *Coll[TData]) EnsureInitializedReflection(v TData)
- func (c *Coll[TData]) Find(ctx context.Context, filter bson.M, opts ...*options.FindOptions) ([]TData, error)
- func (c *Coll[TData]) FindOne(ctx context.Context, filter bson.M) (TData, error)
- func (c *Coll[TData]) FindOneAndReplace(ctx context.Context, filterQuery bson.M, value TData) (TData, error)
- func (c *Coll[TData]) FindOneAndUpdate(ctx context.Context, filterQuery bson.M, updateQuery bson.M) (TData, error)
- func (c *Coll[TData]) FindOneByID(ctx context.Context, id EntityID) (TData, error)
- func (c *Coll[TData]) FindOneOpt(ctx context.Context, filter bson.M) (*TData, error)
- func (c *Coll[TData]) FindOneOptByID(ctx context.Context, id EntityID) (*TData, error)
- func (c *Coll[TData]) Indexes() mongo.IndexView
- func (c *Coll[TData]) InsertOne(ctx context.Context, valueIn TData) (TData, error)
- func (c *Coll[TData]) List(ctx context.Context, filter ct.Filter, pageSize *int, inTok ct.CursorToken) ([]TData, ct.CursorToken, error)
- func (c *Coll[TData]) Name() string
- func (c *Coll[TData]) ReplaceOne(ctx context.Context, filterQuery bson.M, value TData) error
- func (c *Coll[TData]) UpdateMany(ctx context.Context, filterQuery bson.M, updateQuery bson.M) (*mongo.UpdateResult, error)
- func (c *Coll[TData]) UpdateOne(ctx context.Context, filterQuery bson.M, updateQuery bson.M) error
- func (c *Coll[TData]) UpdateOneByID(ctx context.Context, id EntityID, updateQuery bson.M) error
- func (c *Coll[TData]) WithDecodeFunc(cdf func(ctx context.Context, dec Decodable) (TData, error), example TData) *Coll[TData]
- type Cursorable
- type Decodable
- type EntityID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePagination ¶
func CreatePagination[TData any](coll *Coll[TData], token ct.CursorToken, fieldPrimary string, sortPrimary ct.SortDirection, fieldSecondary *string, sortSecondary *ct.SortDirection, pageSize *int) ([]bson.D, error)
Types ¶
type Coll ¶
type Coll[TData any] struct { // contains filtered or unexported fields }
func (*Coll[TData]) AggregateOneOpt ¶ added in v0.0.158
func (*Coll[TData]) Collection ¶
func (c *Coll[TData]) Collection() *mongo.Collection
func (*Coll[TData]) DeleteMany ¶ added in v0.0.134
func (*Coll[TData]) DeleteOneByID ¶ added in v0.0.154
func (*Coll[TData]) EnsureInitializedReflection ¶ added in v0.0.159
func (c *Coll[TData]) EnsureInitializedReflection(v TData)
func (*Coll[TData]) FindOneAndReplace ¶ added in v0.0.139
func (*Coll[TData]) FindOneAndUpdate ¶ added in v0.0.136
func (*Coll[TData]) FindOneByID ¶
func (*Coll[TData]) FindOneOpt ¶
func (*Coll[TData]) FindOneOptByID ¶
func (*Coll[TData]) ReplaceOne ¶
func (*Coll[TData]) UpdateMany ¶ added in v0.0.141
func (*Coll[TData]) UpdateOneByID ¶ added in v0.0.134
type Cursorable ¶ added in v0.0.157
Click to show internal directories.
Click to hide internal directories.