AggregateQuerySnapshot class

The results of executing an aggregation query.

Signature:

exportdeclareclassAggregateQuerySnapshot<AggregateSpecTypeextendsAggregateSpec,AppModelType=DocumentData,DbModelTypeextendsDocumentData=DocumentData>

Properties

PropertyModifiersTypeDescription
queryQuery<AppModelType, DbModelType>The underlying query over which the aggregations recorded in thisAggregateQuerySnapshot were performed.
type(not declared)A type string to uniquely identify instances of this class.

Methods

MethodModifiersDescription
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 theAggregateSpec 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 thisAggregateQuerySnapshot were performed.

Signature:

readonlyquery:Query<AppModelType,DbModelType>;

AggregateQuerySnapshot.type

A type string to uniquely identify instances of this class.

Signature:

readonlytype="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 theAggregateSpec 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 theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-07-07 UTC.