Reference documentation and code samples for the Cloud Firestore V1 Client class AggregationResult.
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.
Generated from protobuf message google.firestore.v1.AggregationResult
Namespace
Google \ Cloud \ Firestore \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ aggregate_fields |
array|Google\Protobuf\Internal\MapField
The result of the aggregation functions, ex: |
getAggregateFields
The result of the aggregation functions, ex: COUNT(*) AS total_docs.
The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField |
|
setAggregateFields
The result of the aggregation functions, ex: COUNT(*) AS total_docs.
The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.
| Parameter | |
|---|---|
| Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
| Returns | |
|---|---|
| Type | Description |
$this |
|