Class AggregateQuerySnapshot (7.3.1)

The results of executing an aggregation query.

Package

@google-cloud/firestore

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the AggregateQuerySnapshot class.

Properties

query

get query(): AggregateQuery<AggregateSpecType, AppModelType, DbModelType>;

The query that was executed to produce this result.

readTime

get readTime(): Timestamp;

The time this snapshot was read.

Methods

data()

data(): firestore.AggregateSpecData<AggregateSpecType>;

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.

Returns
TypeDescription
FirebaseFirestore.AggregateSpecData<AggregateSpecType>

The results of the aggregations performed over the underlying query.

isEqual(other)

isEqual(other: firestore.AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>): boolean;

Compares this object with the given object for equality.

Two AggregateQuerySnapshot instances are considered "equal" if they have the same data and their underlying queries compare "equal" using AggregateQuery.isEqual().

Parameter
NameDescription
other FirebaseFirestore.AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>

The object to compare to this object for equality. true if this object is "equal" to the given object, as defined above, or false otherwise.

Returns
TypeDescription
boolean