Documentation ¶
Index ¶
- type Coll
- func (c *Coll[TData]) Aggregate(ctx context.Context, pipeline mongo.Pipeline, ...) ([]TData, error)
- func (c *Coll[TData]) AggregateOne(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.RawFilter) (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]) InsertMany(ctx context.Context, valueIn []TData) (*mongo.InsertManyResult, error)
- func (c *Coll[TData]) InsertManyUnchecked(ctx context.Context, valueIn []any) (*mongo.InsertManyResult, error)
- func (c *Coll[TData]) InsertOne(ctx context.Context, valueIn TData) (TData, error)
- func (c *Coll[TData]) InsertOneUnchecked(ctx context.Context, valueIn any) (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]) ListWithCount(ctx context.Context, filter ct.Filter, pageSize *int, inTok ct.CursorToken) ([]TData, ct.CursorToken, int64, error)
- func (c *Coll[TData]) Name() string
- func (c *Coll[TData]) Paginate(ctx context.Context, filter pag.Filter, page int, limit *int) ([]TData, pag.Pagination, error)
- 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]
- func (c *Coll[TData]) WithModifyingPipeline(p mongo.Pipeline) *Coll[TData]
- func (c *Coll[TData]) WithModifyingPipelineFunc(fn func(ctx context.Context) mongo.Pipeline) *Coll[TData]
- func (c *Coll[TData]) WithUnmarshalHook(fn func(d TData) TData) *Coll[TData]
- type Cursorable
- type Decodable
- type EntityID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coll ¶
type Coll[TData any] struct { // contains filtered or unexported fields }
func (*Coll[TData]) AggregateOne ¶ added in v0.0.170
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]) InsertMany ¶ added in v0.0.186
func (*Coll[TData]) InsertManyUnchecked ¶ added in v0.0.306
func (c *Coll[TData]) InsertManyUnchecked(ctx context.Context, valueIn []any) (*mongo.InsertManyResult, error)
InsertManyUnchecked behaves the same as InsertOne, but allows arbitrary data to be inserted (valueIn is []any instead of []TData)
func (*Coll[TData]) InsertOneUnchecked ¶ added in v0.0.305
InsertOneUnchecked behaves the same as InsertOne, but allows arbitrary data to be inserted (valueIn is any instead of TData)
func (*Coll[TData]) ListWithCount ¶ added in v0.0.265
func (*Coll[TData]) ReplaceOne ¶
func (*Coll[TData]) UpdateMany ¶ added in v0.0.141
func (*Coll[TData]) UpdateOneByID ¶ added in v0.0.134
func (*Coll[TData]) WithDecodeFunc ¶ added in v0.0.157
func (*Coll[TData]) WithModifyingPipeline ¶ added in v0.0.304
func (*Coll[TData]) WithModifyingPipelineFunc ¶ added in v0.0.363
func (*Coll[TData]) WithUnmarshalHook ¶ added in v0.0.300
type Cursorable ¶ added in v0.0.157
Click to show internal directories.
Click to hide internal directories.