v0.0.473 add ctx to wmo.FilterQuery|Sort|Pagination
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m23s

This commit is contained in:
2024-06-14 17:24:59 +02:00
parent 94a7bf250d
commit fc4bed4b9f
5 changed files with 17 additions and 15 deletions

View File

@@ -25,8 +25,8 @@ func (c *Coll[TData]) List(ctx context.Context, filter ct.Filter, pageSize *int,
pd2 := ct.SortASC
if filter != nil {
pipeline = filter.FilterQuery()
pf1, pd1, pf2, pd2 = filter.Pagination()
pipeline = filter.FilterQuery(ctx)
pf1, pd1, pf2, pd2 = filter.Pagination(ctx)
}
sortPrimary := pf1
@@ -109,7 +109,7 @@ func (c *Coll[TData]) Count(ctx context.Context, filter ct.RawFilter) (int64, er
Count int64 `bson:"c"`
}
pipeline := filter.FilterQuery()
pipeline := filter.FilterQuery(ctx)
pipeline = append(pipeline, bson.D{{Key: "$count", Value: "c"}})
@@ -152,7 +152,7 @@ func (c *Coll[TData]) ListAllIDs(ctx context.Context, filter ct.RawFilter) ([]st
pipelineFilter := mongo.Pipeline{}
if filter != nil {
pipelineFilter = filter.FilterQuery()
pipelineFilter = filter.FilterQuery(ctx)
}
extrModPipelineResolved := mongo.Pipeline{}