v0.0.265 add ListWithCount
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 49s

This commit is contained in:
2023-09-18 12:57:27 +02:00
parent de2ca763c1
commit d56a0235af
4 changed files with 6 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ func (c *Coll[TData]) Count(ctx context.Context, filter ct.Filter) (int64, error
}
func (c *Coll[TData]) ListWithCount(ctx context.Context, filter ct.Filter, pageSize *int, inTok ct.CursorToken) ([]TData, ct.CursorToken, int64, error) {
// NOTE: Possible optimasation: Cache count in CursorToken, then fetch count only on first page.
// NOTE: Possible optimization: Cache count in CursorToken, then fetch count only on first page.
count, err := c.Count(ctx, filter)
if err != nil {
return nil, ct.CursorToken{}, 0, err