v0.0.301 pagination (page+limit) support in wmo
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 2m11s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 2m11s
This commit is contained in:
@@ -91,11 +91,11 @@ func (c *Coll[TData]) List(ctx context.Context, filter ct.Filter, pageSize *int,
|
||||
return entities, nextToken, nil
|
||||
}
|
||||
|
||||
type countRes struct {
|
||||
Count int64 `bson:"c"`
|
||||
}
|
||||
func (c *Coll[TData]) Count(ctx context.Context, filter ct.RawFilter) (int64, error) {
|
||||
type countRes struct {
|
||||
Count int64 `bson:"c"`
|
||||
}
|
||||
|
||||
func (c *Coll[TData]) Count(ctx context.Context, filter ct.Filter) (int64, error) {
|
||||
pipeline := filter.FilterQuery()
|
||||
|
||||
pipeline = append(pipeline, bson.D{{Key: "$count", Value: "c"}})
|
||||
|
Reference in New Issue
Block a user