Class: Google::Apis::DatastoreV1beta3::QueryResultBatch

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



582
583
584
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 582

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. Corresponds to the JSON property endCursor

Returns:

  • (String)


554
555
556
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 554

def end_cursor
  @end_cursor
end

#entity_result_typeString

The result type for every entity in entity_results. Corresponds to the JSON property entityResultType

Returns:

  • (String)


565
566
567
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 565

def entity_result_type
  @entity_result_type
end

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

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



575
576
577
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 575

def entity_results
  @entity_results
end

#more_resultsString

The state of the query after the current batch. Corresponds to the JSON property moreResults

Returns:

  • (String)


570
571
572
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 570

def more_results
  @more_results
end

#skipped_cursorString

A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0. Corresponds to the JSON property skippedCursor

Returns:

  • (String)


560
561
562
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 560

def skipped_cursor
  @skipped_cursor
end

#skipped_resultsFixnum

The number of results skipped, typically because of an offset. Corresponds to the JSON property skippedResults

Returns:

  • (Fixnum)


580
581
582
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 580

def skipped_results
  @skipped_results
end

#snapshot_versionString

The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor). In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. Corresponds to the JSON property snapshotVersion

Returns:

  • (String)


549
550
551
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 549

def snapshot_version
  @snapshot_version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



587
588
589
590
591
592
593
594
595
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 587

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