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.



74
75
76
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 74

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



67
68
69
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 67

def aggregations
  @aggregations
end

#nested_queryGoogle::Apis::DatastoreV1beta3::Query

A query for entities. Corresponds to the JSON property nestedQuery



72
73
74
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 72

def nested_query
  @nested_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



79
80
81
82
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 79

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