v0.0.363 wmo.extraModPipeline as func
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m9s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m9s
This commit is contained in:
@@ -10,7 +10,9 @@ import (
|
||||
|
||||
func (c *Coll[TData]) Aggregate(ctx context.Context, pipeline mongo.Pipeline, opts ...*options.AggregateOptions) ([]TData, error) {
|
||||
|
||||
pipeline = langext.ArrConcat(pipeline, c.extraModPipeline)
|
||||
for _, ppl := range c.extraModPipeline {
|
||||
pipeline = langext.ArrConcat(pipeline, ppl(ctx))
|
||||
}
|
||||
|
||||
cursor, err := c.coll.Aggregate(ctx, pipeline, opts...)
|
||||
if err != nil {
|
||||
@@ -27,7 +29,9 @@ func (c *Coll[TData]) Aggregate(ctx context.Context, pipeline mongo.Pipeline, op
|
||||
|
||||
func (c *Coll[TData]) AggregateOneOpt(ctx context.Context, pipeline mongo.Pipeline, opts ...*options.AggregateOptions) (*TData, error) {
|
||||
|
||||
pipeline = langext.ArrConcat(pipeline, c.extraModPipeline)
|
||||
for _, ppl := range c.extraModPipeline {
|
||||
pipeline = langext.ArrConcat(pipeline, ppl(ctx))
|
||||
}
|
||||
|
||||
cursor, err := c.coll.Aggregate(ctx, pipeline, opts...)
|
||||
if err != nil {
|
||||
@@ -47,7 +51,9 @@ func (c *Coll[TData]) AggregateOneOpt(ctx context.Context, pipeline mongo.Pipeli
|
||||
|
||||
func (c *Coll[TData]) AggregateOne(ctx context.Context, pipeline mongo.Pipeline, opts ...*options.AggregateOptions) (TData, error) {
|
||||
|
||||
pipeline = langext.ArrConcat(pipeline, c.extraModPipeline)
|
||||
for _, ppl := range c.extraModPipeline {
|
||||
pipeline = langext.ArrConcat(pipeline, ppl(ctx))
|
||||
}
|
||||
|
||||
cursor, err := c.coll.Aggregate(ctx, pipeline, opts...)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user