Reference documentation and code samples for the Cloud Datastore V1 Client class AggregationResult.
The result of a single bucket from a Datastore aggregation query.
The keys ofaggregate_propertiesare the same for all results in an
aggregation query, unlike entity queries which can have different fields
present for each result.
Generated from protobuf messagegoogle.datastore.v1.AggregationResult
The result of the aggregation functions, ex:COUNT(*) AS total_entities. The key is thealiasassigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.
getAggregateProperties
The result of the aggregation functions, ex:COUNT(*) AS total_entities.
The key is thealiasassigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Datastore V1 Client - Class AggregationResult (1.33.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.33.1 (latest)](/php/docs/reference/cloud-datastore/latest/V1.AggregationResult)\n- [1.33.0](/php/docs/reference/cloud-datastore/1.33.0/V1.AggregationResult)\n- [1.32.3](/php/docs/reference/cloud-datastore/1.32.3/V1.AggregationResult)\n- [1.31.0](/php/docs/reference/cloud-datastore/1.31.0/V1.AggregationResult)\n- [1.30.0](/php/docs/reference/cloud-datastore/1.30.0/V1.AggregationResult)\n- [1.29.2](/php/docs/reference/cloud-datastore/1.29.2/V1.AggregationResult)\n- [1.28.2](/php/docs/reference/cloud-datastore/1.28.2/V1.AggregationResult)\n- [1.26.0](/php/docs/reference/cloud-datastore/1.26.0/V1.AggregationResult)\n- [1.25.0](/php/docs/reference/cloud-datastore/1.25.0/V1.AggregationResult)\n- [1.24.4](/php/docs/reference/cloud-datastore/1.24.4/V1.AggregationResult)\n- [1.23.0](/php/docs/reference/cloud-datastore/1.23.0/V1.AggregationResult)\n- [1.22.1](/php/docs/reference/cloud-datastore/1.22.1/V1.AggregationResult)\n- [1.21.2](/php/docs/reference/cloud-datastore/1.21.2/V1.AggregationResult)\n- [1.19.0](/php/docs/reference/cloud-datastore/1.19.0/V1.AggregationResult)\n- [1.18.1](/php/docs/reference/cloud-datastore/1.18.1/V1.AggregationResult)\n- [1.17.1](/php/docs/reference/cloud-datastore/1.17.1/V1.AggregationResult) \nReference documentation and code samples for the Cloud Datastore V1 Client class AggregationResult.\n\nThe result of a single bucket from a Datastore aggregation query.\n\nThe keys of `aggregate_properties` are the same for all results in an\naggregation query, unlike entity queries which can have different fields\npresent for each result.\n\nGenerated from protobuf message `google.datastore.v1.AggregationResult`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Datastore \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAggregateProperties\n\nThe result of the aggregation functions, ex: `COUNT(*) AS total_entities`.\n\nThe key is the\n[alias](/php/docs/reference/cloud-datastore/latest/V1.AggregationQuery.Aggregation#_Google_Cloud_Datastore_V1_AggregationQuery_Aggregation__getAlias__) assigned to\nthe aggregation function on input and the size of this map equals the\nnumber of aggregation functions in the query.\n\n### setAggregateProperties\n\nThe result of the aggregation functions, ex: `COUNT(*) AS total_entities`.\n\nThe key is the\n[alias](/php/docs/reference/cloud-datastore/latest/V1.AggregationQuery.Aggregation#_Google_Cloud_Datastore_V1_AggregationQuery_Aggregation__getAlias__) assigned to\nthe aggregation function on input and the size of this map equals the\nnumber of aggregation functions in the query."]]