Class: Google::Apis::DatastoreV1beta2::QueryResultBatch

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

Overview

A batch of results produced by a query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ QueryResultBatch

Returns a new instance of QueryResultBatch.



924
925
926
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 924

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

Instance Attribute Details

#end_cursorString

A cursor that points to the position after the last result in the batch. May be absent. TODO(arfuller): Once all plans produce cursors update documentation here. Corresponds to the JSON property endCursor

Returns:

  • (String)


899
900
901
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 899

def end_cursor
  @end_cursor
end

#entity_result_typeString

The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key. Corresponds to the JSON property entityResultType

Returns:

  • (String)


906
907
908
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 906

def entity_result_type
  @entity_result_type
end

#entity_resultsArray<Google::Apis::DatastoreV1beta2::EntityResult>

The results for this batch. Corresponds to the JSON property entityResults



911
912
913
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 911

def entity_results
  @entity_results
end

#more_resultsString

The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults. Corresponds to the JSON property moreResults

Returns:

  • (String)


917
918
919
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 917

def more_results
  @more_results
end

#skipped_resultsFixnum

The number of results skipped because of Query.offset. Corresponds to the JSON property skippedResults

Returns:

  • (Fixnum)


922
923
924
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 922

def skipped_results
  @skipped_results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



929
930
931
932
933
934
935
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 929

def update!(**args)
  @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
  @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
  @entity_results = args[:entity_results] if args.key?(:entity_results)
  @more_results = args[:more_results] if args.key?(:more_results)
  @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
end