Class: Google::Apis::FirestoreV1beta1::AggregationResult
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1beta1::AggregationResult
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firestore_v1beta1/classes.rb,
lib/google/apis/firestore_v1beta1/representations.rb,
lib/google/apis/firestore_v1beta1/representations.rb
Overview
The result of a single bucket from a Firestore aggregation query. The keys of
aggregate_fields are the same for all results in an aggregation query, unlike
document queries which can have different fields present for each result.
Instance Attribute Summary collapse
-
#aggregate_fields ⇒ Hash<String,Google::Apis::FirestoreV1beta1::Value>
The result of the aggregation functions, ex:
COUNT(*) AS total_docs.
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.
97 98 99 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 97 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aggregate_fields ⇒ Hash<String,Google::Apis::FirestoreV1beta1::Value>
The result of the aggregation functions, ex: COUNT(*) AS total_docs. 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 aggregateFields
95 96 97 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 95 def aggregate_fields @aggregate_fields end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
102 103 104 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 102 def update!(**args) @aggregate_fields = args[:aggregate_fields] if args.key?(:aggregate_fields) end |