A query that calculates aggregations over an underlying query.
Package
@google-cloud/firestoreRemarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the AggregateQuery
class.
Properties
query
get query(): Query<AppModelType, DbModelType>;
The query whose aggregations will be calculated by this object.
Methods
get()
get(): Promise<AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>>;
Executes this query.
A promise that will be resolved with the results of the query.
Returns | |
---|---|
Type | Description |
Promise<AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>> |
isEqual(other)
isEqual(other: firestore.AggregateQuery<AggregateSpecType, AppModelType, DbModelType>): boolean;
Compares this object with the given object for equality.
This object is considered "equal" to the other object if and only if other
performs the same aggregations as this AggregateQuery
and the underlying Query of other
compares equal to that of this object using Query.isEqual()
.
Parameter | |
---|---|
Name | Description |
other |
FirebaseFirestore.AggregateQuery<AggregateSpecType, AppModelType, DbModelType>
The object to compare to this object for equality. |
Returns | |
---|---|
Type | Description |
boolean |