Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::AggregationResult.
The result of a single bucket from a Datastore aggregation query.
The keys of aggregate_properties are the same for all results in an
aggregation query, unlike entity queries which can have different fields
present for each result.
(::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::Value}) — The result of the aggregation functions, ex: COUNT(*) AS total_entities.
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.
value (::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::Value}) — The result of the aggregation functions, ex: COUNT(*) AS total_entities.
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
(::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::Value}) — The result of the aggregation functions, ex: COUNT(*) AS total_entities.
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.
[[["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,["# Firestore in Datastore mode V1 API - Class Google::Cloud::Datastore::V1::AggregationResult (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationResult)\n- [1.4.0](/ruby/docs/reference/google-cloud-datastore-v1/1.4.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [1.3.1](/ruby/docs/reference/google-cloud-datastore-v1/1.3.1/Google-Cloud-Datastore-V1-AggregationResult)\n- [1.2.0](/ruby/docs/reference/google-cloud-datastore-v1/1.2.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [1.1.0](/ruby/docs/reference/google-cloud-datastore-v1/1.1.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [1.0.1](/ruby/docs/reference/google-cloud-datastore-v1/1.0.1/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.19.0](/ruby/docs/reference/google-cloud-datastore-v1/0.19.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.18.0](/ruby/docs/reference/google-cloud-datastore-v1/0.18.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.17.0](/ruby/docs/reference/google-cloud-datastore-v1/0.17.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.16.3](/ruby/docs/reference/google-cloud-datastore-v1/0.16.3/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.15.0](/ruby/docs/reference/google-cloud-datastore-v1/0.15.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.14.0](/ruby/docs/reference/google-cloud-datastore-v1/0.14.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.13.1](/ruby/docs/reference/google-cloud-datastore-v1/0.13.1/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.12.0](/ruby/docs/reference/google-cloud-datastore-v1/0.12.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.11.1](/ruby/docs/reference/google-cloud-datastore-v1/0.11.1/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.10.0](/ruby/docs/reference/google-cloud-datastore-v1/0.10.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.9.0](/ruby/docs/reference/google-cloud-datastore-v1/0.9.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.8.0](/ruby/docs/reference/google-cloud-datastore-v1/0.8.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.7.0](/ruby/docs/reference/google-cloud-datastore-v1/0.7.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.6.0](/ruby/docs/reference/google-cloud-datastore-v1/0.6.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.5.0](/ruby/docs/reference/google-cloud-datastore-v1/0.5.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.4.0](/ruby/docs/reference/google-cloud-datastore-v1/0.4.0/Google-Cloud-Datastore-V1-AggregationResult)\n- [0.3.5](/ruby/docs/reference/google-cloud-datastore-v1/0.3.5/Google-Cloud-Datastore-V1-AggregationResult) \nReference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::AggregationResult.\n\nThe result of a single bucket from a Datastore aggregation query.\n\n\n\u003cbr /\u003e\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\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #aggregate_properties\n\n def aggregate_properties() -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::Datastore::V1::Value}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Datastore::V1::Value}) --- The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.\n\n\n The key is the\n [alias](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationQuery-Aggregation#Google__Cloud__Datastore__V1__AggregationQuery__Aggregation_alias_instance_ \"Google::Cloud::Datastore::V1::AggregationQuery::Aggregation#alias (method)\") assigned to\n the aggregation function on input and the size of this map equals the\n number of aggregation functions in the query.\n\n### #aggregate_properties=\n\n def aggregate_properties=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::Datastore::V1::Value}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Datastore::V1::Value}) --- The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.\n\n\n The key is the\n [alias](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationQuery-Aggregation#Google__Cloud__Datastore__V1__AggregationQuery__Aggregation_alias_instance_ \"Google::Cloud::Datastore::V1::AggregationQuery::Aggregation#alias (method)\") assigned to\n the aggregation function on input and the size of this map equals the\nnumber of aggregation functions in the query. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Datastore::V1::Value}) --- The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.\n\n\n The key is the\n [alias](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationQuery-Aggregation#Google__Cloud__Datastore__V1__AggregationQuery__Aggregation_alias_instance_ \"Google::Cloud::Datastore::V1::AggregationQuery::Aggregation#alias (method)\") assigned to\n the aggregation function on input and the size of this map equals the\n number of aggregation functions in the query."]]