Class: Google::Apis::FirestoreV1::StructuredAggregationQuery

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

Overview

Firestore query for running an aggregation over a StructuredQuery.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StructuredAggregationQuery

Returns a new instance of StructuredAggregationQuery.



4428
4429
4430
# File 'lib/google/apis/firestore_v1/classes.rb', line 4428

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

Instance Attribute Details

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

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



4419
4420
4421
# File 'lib/google/apis/firestore_v1/classes.rb', line 4419

def aggregations
  @aggregations
end

#structured_queryGoogle::Apis::FirestoreV1::StructuredQuery

A Firestore query. The query stages are executed in the following order: 1. from 2. where 3. select 4. order_by + start_at + end_at 5. offset 6. limit 7. find_nearest Corresponds to the JSON property structuredQuery



4426
4427
4428
# File 'lib/google/apis/firestore_v1/classes.rb', line 4426

def structured_query
  @structured_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4433
4434
4435
4436
# File 'lib/google/apis/firestore_v1/classes.rb', line 4433

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