Class: Google::Apis::DatastoreV1::AggregationResultBatch

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datastore_v1/classes.rb,
lib/google/apis/datastore_v1/representations.rb,
lib/google/apis/datastore_v1/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.



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

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

Instance Attribute Details

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

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



141
142
143
# File 'lib/google/apis/datastore_v1/classes.rb', line 141

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)


148
149
150
# File 'lib/google/apis/datastore_v1/classes.rb', line 148

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)


155
156
157
# File 'lib/google/apis/datastore_v1/classes.rb', line 155

def read_time
  @read_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



162
163
164
165
166
# File 'lib/google/apis/datastore_v1/classes.rb', line 162

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