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

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 results produced by a query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryResultBatch

Returns a new instance of QueryResultBatch.



1752
1753
1754
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1752

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 NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1701
1702
1703
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1701

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)


1706
1707
1708
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1706

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



1711
1712
1713
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1711

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)


1716
1717
1718
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1716

def more_results
  @more_results
end

#read_timeString

Read timestamp 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 timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore. Corresponds to the JSON property readTime

Returns:

  • (String)


1727
1728
1729
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1727

def read_time
  @read_time
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 NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1734
1735
1736
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1734

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)


1739
1740
1741
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1739

def skipped_results
  @skipped_results
end

#snapshot_versionFixnum

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. The value will be zero for eventually consistent queries. Corresponds to the JSON property snapshotVersion

Returns:

  • (Fixnum)


1750
1751
1752
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1750

def snapshot_version
  @snapshot_version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1757

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)
  @read_time = args[:read_time] if args.key?(:read_time)
  @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
  @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
  @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
end