Class: Google::Cloud::Firestore::AggregateQuerySnapshot
- Inherits:
-
Object
- Object
- Google::Cloud::Firestore::AggregateQuerySnapshot
- Defined in:
- lib/google/cloud/firestore/aggregate_query_snapshot.rb
Overview
AggregateQuerySnapshot
An aggregate query snapshot object is an immutable representation for an aggregate query result.
Instance Method Summary collapse
-
#get(aggregate_alias = nil) ⇒ Integer, ...
Retrieves the aggregate data.
Instance Method Details
#get(aggregate_alias = nil) ⇒ Integer, ...
Retrieves the aggregate data.
110 111 112 113 114 115 116 |
# File 'lib/google/cloud/firestore/aggregate_query_snapshot.rb', line 110 def get aggregate_alias = nil if @aggregate_fields.count > 1 && aggregate_alias.nil? raise ArgumentError, "Required param aggregate_alias for AggregateQuery with multiple aggregate fields" end aggregate_alias ||= @aggregate_fields.keys.first @aggregate_fields[aggregate_alias] end |