Class: Google::Apis::DatastoreV1beta2::ReadOptions

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

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.



955
956
957
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 955

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

Instance Attribute Details

#read_consistencyString

The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default. Corresponds to the JSON property readConsistency

Returns:

  • (String)


948
949
950
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 948

def read_consistency
  @read_consistency
end

#transactionString

The transaction to use. Optional. Corresponds to the JSON property transaction

Returns:

  • (String)


953
954
955
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 953

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



960
961
962
963
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 960

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