Class: Google::Apis::FirestoreV1beta1::Aggregation
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1beta1::Aggregation
- 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
Defines a aggregation that produces a single result.
Instance Attribute Summary collapse
-
#alias ⇒ String
Required.
-
#count ⇒ Google::Apis::FirestoreV1beta1::Count
Count of documents that match the query.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Aggregation
constructor
A new instance of Aggregation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Aggregation
Returns a new instance of Aggregation.
42 43 44 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 42 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alias ⇒ String
Required. The name of the field to store the result of the aggregation into.
Requires: * Must be present. * Must be unique across all aggregation aliases. *
Conform to existing document field name limitations.
Corresponds to the JSON property alias
34 35 36 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 34 def alias @alias end |
#count ⇒ Google::Apis::FirestoreV1beta1::Count
Count of documents that match the query. The COUNT(*) aggregation function
operates on the entire document so it does not require a field reference.
Corresponds to the JSON property count
40 41 42 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 40 def count @count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
47 48 49 50 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 47 def update!(**args) @alias = args[:alias] if args.key?(:alias) @count = args[:count] if args.key?(:count) end |