Class: Google::Apis::DatastoreV1::AggregationQuery

Inherits:
Object
  • Object
show all
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
more...

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.

[View source]

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

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

Instance Attribute Details

#aggregationsArray<Google::Apis::DatastoreV1::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


93
94
95
# File 'lib/google/apis/datastore_v1/classes.rb', line 93

def aggregations
  @aggregations
end

#nested_queryGoogle::Apis::DatastoreV1::Query

A query for entities. Corresponds to the JSON property nestedQuery


98
99
100
# File 'lib/google/apis/datastore_v1/classes.rb', line 98

def nested_query
  @nested_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

105
106
107
108
# File 'lib/google/apis/datastore_v1/classes.rb', line 105

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