This commit is contained in:
2023-06-10 16:22:14 +02:00
parent d017530444
commit b613b122e3
8 changed files with 103 additions and 48 deletions

View File

@@ -12,8 +12,7 @@ func (c *Coll[TData]) Aggregate(ctx context.Context, pipeline mongo.Pipeline, op
return nil, err
}
res := make([]TData, 0, cursor.RemainingBatchLength())
err = cursor.All(ctx, &res)
res, err := c.decodeAll(ctx, cursor)
if err != nil {
return nil, err
}