v0.0.437 properly handle $group in wmo extraModPipeline
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 3m23s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 3m23s
This commit is contained in:
@@ -36,6 +36,14 @@ func (c *Coll[TData]) Find(ctx context.Context, filter bson.M, opts ...*options.
|
||||
pipeline = langext.ArrConcat(pipeline, ppl(ctx))
|
||||
}
|
||||
|
||||
if c.needsDoubleSort(ctx) {
|
||||
for _, opt := range opts {
|
||||
if opt != nil && opt.Sort != nil {
|
||||
pipeline = append(pipeline, bson.D{{Key: "$sort", Value: opt.Sort}})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, opt := range opts {
|
||||
if opt != nil && opt.Projection != nil {
|
||||
pipeline = append(pipeline, bson.D{{Key: "$project", Value: opt.Projection}})
|
||||
|
Reference in New Issue
Block a user