AggregateQuery class

A class that represents an aggregation query over a Query.

Use this to perform aggregations like count, sum, or average on the results of a query.

Parameters:

  • query: The base query to aggregate over.

Returns: An instance of AggregateQuery.

Example:

var aggQuery = query.aggregate(count());

Constructors

AggregateQuery({required Query<Object?> query})

Properties

hashCode → int
The hash code for this object.
no setterinherited
query → Query<Object?>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

count() → AggregateQuery
Configures the aggregation to perform a count.
get({AggregateSource source = AggregateSource.server}) → Future<AggregateQuerySnapshot>
Executes the aggregation query and returns the results.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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