AggregationBuilder class final

Collects aggregation specifications and executes them over documents.

Constructors

AggregationBuilder()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

avg(String field) → AggregationBuilder
Adds an average over the numeric values of field.
count([String? field]) → AggregationBuilder
Adds a count aggregation; with field, counts non-null values only.
distinct(String field) → AggregationBuilder
Adds a distinct-value count over field.
execute(List<Map<String, dynamic>> documents) → dynamic
Runs the configured aggregations over documents.
groupBy(String field) → AggregationBuilder
Groups documents by field before aggregating.
max(String field) → AggregationBuilder
Adds a maximum over the values of field.
min(String field) → AggregationBuilder
Adds a minimum over the values of field.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sum(String field) → AggregationBuilder
Adds a sum over the numeric values of field.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited