AggregateQuerySnapshot class
Stay organized with collections
Save and categorize content based on your preferences.
The results of executing an aggregation query.
Signature:
export declare class AggregateQuerySnapshot<AggregateSpecType extends AggregateSpec, AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData>
Properties
Property |
Modifiers |
Type |
Description |
query |
|
Query<AppModelType, DbModelType> |
The underlying query over which the aggregations recorded in this AggregateQuerySnapshot were performed. |
type |
|
(not declared) |
A type string to uniquely identify instances of this class. |
Methods
Method |
Modifiers |
Description |
data() |
|
Returns the results of the aggregations performed over the underlying query.The keys of the returned object will be the same as those of the AggregateSpec object specified to the aggregation method, and the values will be the corresponding aggregation result. |
AggregateQuerySnapshot.query
The underlying query over which the aggregations recorded in this AggregateQuerySnapshot
were performed.
Signature:
readonly query: Query<AppModelType, DbModelType>;
AggregateQuerySnapshot.type
A type string to uniquely identify instances of this class.
Signature:
readonly type = "AggregateQuerySnapshot";
AggregateQuerySnapshot.data()
Returns the results of the aggregations performed over the underlying query.
The keys of the returned object will be the same as those of the AggregateSpec
object specified to the aggregation method, and the values will be the corresponding aggregation result.
Signature:
data(): AggregateSpecData<AggregateSpecType>;
Returns:
AggregateSpecData<AggregateSpecType>
The results of the aggregations performed over the underlying query.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-07-07 UTC.
[null,null,["Last updated 2023-07-07 UTC."],[],[],null,["# AggregateQuerySnapshot class\n\nThe results of executing an aggregation query.\n\n**Signature:** \n\n export declare class AggregateQuerySnapshot\u003cAggregateSpecType extends AggregateSpec, AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData\u003e \n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-----------------------------------------------------------------------------|-----------|-------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| [query](./firestore_.aggregatequerysnapshot.md#aggregatequerysnapshotquery) | | [Query](./firestore_.query.md#query_class)\\\u003cAppModelType, DbModelType\\\u003e | The underlying query over which the aggregations recorded in this `AggregateQuerySnapshot` were performed. |\n| [type](./firestore_.aggregatequerysnapshot.md#aggregatequerysnapshottype) | | (not declared) | A type string to uniquely identify instances of this class. |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [data()](./firestore_.aggregatequerysnapshot.md#aggregatequerysnapshotdata) | | Returns the results of the aggregations performed over the underlying query.The keys of the returned object will be the same as those of the `AggregateSpec` object specified to the aggregation method, and the values will be the corresponding aggregation result. |\n\nAggregateQuerySnapshot.query\n----------------------------\n\nThe underlying query over which the aggregations recorded in this `AggregateQuerySnapshot` were performed.\n\n**Signature:** \n\n readonly query: Query\u003cAppModelType, DbModelType\u003e;\n\nAggregateQuerySnapshot.type\n---------------------------\n\nA type string to uniquely identify instances of this class.\n\n**Signature:** \n\n readonly type = \"AggregateQuerySnapshot\";\n\nAggregateQuerySnapshot.data()\n-----------------------------\n\nReturns the results of the aggregations performed over the underlying query.\n\nThe keys of the returned object will be the same as those of the `AggregateSpec` object specified to the aggregation method, and the values will be the corresponding aggregation result.\n\n**Signature:** \n\n data(): AggregateSpecData\u003cAggregateSpecType\u003e;\n\n**Returns:**\n\n[AggregateSpecData](./firestore_.md#aggregatespecdata)\\\u003cAggregateSpecType\\\u003e\n\nThe results of the aggregations performed over the underlying query."]]