Class: Google::Apis::DatastoreV1::ReadOptions

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

Overview

The options shared by read requests.

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) ⇒ ReadOptions

Returns a new instance of ReadOptions.



185
186
187
# File 'generated/google/apis/datastore_v1/classes.rb', line 185

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

Instance Attribute Details

#read_consistencyString

The non-transactional read consistency to use. Cannot be set to STRONG for global queries. Corresponds to the JSON property readConsistency

Returns:

  • (String)


183
184
185
# File 'generated/google/apis/datastore_v1/classes.rb', line 183

def read_consistency
  @read_consistency
end

#transactionString

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction. Corresponds to the JSON property transaction

Returns:

  • (String)


177
178
179
# File 'generated/google/apis/datastore_v1/classes.rb', line 177

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



190
191
192
193
# File 'generated/google/apis/datastore_v1/classes.rb', line 190

def update!(**args)
  @transaction = args[:transaction] if args.key?(:transaction)
  @read_consistency = args[:read_consistency] if args.key?(:read_consistency)
end