Class AggregationResult (2.9.1)

Stay organized with collections Save and categorize content based on your preferences.
AggregationResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The result of a single bucket from a Firestore aggregation query.

The keys of aggregate_fields are the same for all results in an aggregation query, unlike document queries which can have different fields present for each result.

Attribute

NameDescription
aggregate_fields MutableMapping[str, google.cloud.firestore_v1.types.Value]
The result of the aggregation functions, ex: COUNT(*) AS total_docs. The key is the alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

Classes

AggregateFieldsEntry

AggregateFieldsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.