Skip to content

v6: Add shortcut for querying total collection size #423

@bevzzz

Description

@bevzzz

We can use Aggregation API to find the total size (object count) of a collection:

var things = client.collections.use("Things");

var count = things.aggregate.overAll(opt -> opt.includeTotalCount(true)).totalCount();

For convenience, let's provide a helper things.size() that does the same thing idiomatically.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions