Class: Google::Apis::DatastoreV1beta3::AggregationQuery

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datastore_v1beta3/classes.rb,
lib/google/apis/datastore_v1beta3/representations.rb,
lib/google/apis/datastore_v1beta3/representations.rb

Overview

Datastore query for running an aggregation over a Query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AggregationQuery

Returns a new instance of AggregationQuery.



102
103
104
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 102

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aggregationsArray<Google::Apis::DatastoreV1beta3::Aggregation>

Optional. Series of aggregations to apply over the results of the nested_query. Requires: * A minimum of one and maximum of five aggregations per query. Corresponds to the JSON property aggregations



95
96
97
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 95

def aggregations
  @aggregations
end

#nested_queryGoogle::Apis::DatastoreV1beta3::Query

A query for entities. Corresponds to the JSON property nestedQuery



100
101
102
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 100

def nested_query
  @nested_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



107
108
109
110
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 107

def update!(**args)
  @aggregations = args[:aggregations] if args.key?(:aggregations)
  @nested_query = args[:nested_query] if args.key?(:nested_query)
end