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
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m23s
This commit is contained in:
@@ -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{}
|
||||
|
@@ -23,8 +23,8 @@ func (c *Coll[TData]) Paginate(ctx context.Context, filter pag.MongoFilter, page
|
||||
sort := bson.D{}
|
||||
|
||||
if filter != nil {
|
||||
pipelineFilter = filter.FilterQuery()
|
||||
sort = filter.Sort()
|
||||
pipelineFilter = filter.FilterQuery(ctx)
|
||||
sort = filter.Sort(ctx)
|
||||
}
|
||||
|
||||
if len(sort) != 0 {
|
||||
|
Reference in New Issue
Block a user