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

Constructor Details

#initialize(**args) ⇒ ReadOptions

Returns a new instance of ReadOptions.



1766
1767
1768
# File 'generated/google/apis/datastore_v1/classes.rb', line 1766

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)


1757
1758
1759
# File 'generated/google/apis/datastore_v1/classes.rb', line 1757

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

Returns:

  • (String)


1764
1765
1766
# File 'generated/google/apis/datastore_v1/classes.rb', line 1764

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1771
1772
1773
1774
# File 'generated/google/apis/datastore_v1/classes.rb', line 1771

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