Class: Google::Apis::DatastoreV1::AggregationResult
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1::AggregationResult
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/datastore_v1/classes.rb,
lib/google/apis/datastore_v1/representations.rb,
lib/google/apis/datastore_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#aggregate_properties ⇒ Hash<String,Google::Apis::DatastoreV1::Value>
The result of the aggregation functions, ex:
COUNT(*) AS total_entities
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AggregationResult
constructor
A new instance of AggregationResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AggregationResult
Returns a new instance of AggregationResult.
128 129 130 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 128 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aggregate_properties ⇒ Hash<String,Google::Apis::DatastoreV1::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.
Corresponds to the JSON property aggregateProperties
126 127 128 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 126 def aggregate_properties @aggregate_properties end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
133 134 135 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 133 def update!(**args) @aggregate_properties = args[:aggregate_properties] if args.key?(:aggregate_properties) end |