Class: Google::Apis::DatastoreV1beta3::AggregationResultBatch

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

Overview

A batch of aggregation results produced by an aggregation query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AggregationResultBatch

Returns a new instance of AggregationResultBatch.



159
160
161
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 159

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

Instance Attribute Details

#aggregation_resultsArray<Google::Apis::DatastoreV1beta3::AggregationResult>

The aggregation results for this batch. Corresponds to the JSON property aggregationResults



143
144
145
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 143

def aggregation_results
  @aggregation_results
end

#more_resultsString

The state of the query after the current batch. Only COUNT(*) aggregations are supported in the initial launch. Therefore, expected result type is limited to NO_MORE_RESULTS. Corresponds to the JSON property moreResults

Returns:

  • (String)


150
151
152
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 150

def more_results
  @more_results
end

#read_timeString

Read timestamp this batch was returned from. In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. Corresponds to the JSON property readTime

Returns:

  • (String)


157
158
159
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 157

def read_time
  @read_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



164
165
166
167
168
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 164

def update!(**args)
  @aggregation_results = args[:aggregation_results] if args.key?(:aggregation_results)
  @more_results = args[:more_results] if args.key?(:more_results)
  @read_time = args[:read_time] if args.key?(:read_time)
end