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
explain(options)
explain(options?: firestore.ExplainOptions): Promise<ExplainResults<AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>>>;
Plans and optionally executes this query. Returns a Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
A Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
Parameter | |
---|---|
Name | Description |
options |
firestore.ExplainOptions
|
Returns | |
---|---|
Type | Description |
Promise<ExplainResults<AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>>> |
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 |