aggregate method
Returns an AggregateQuery that calculates the given aggregations over the result set of this query without downloading the documents.
Implementation
AggregateQuery aggregate(List<AggregateField> aggregateFields) {
if (aggregateFields.isEmpty) {
throw ArgumentError('At least one AggregateField is required.');
}
return AggregateQuery(this, aggregateFields);
}