Class: Google::Apis::DatastoreV1beta3::ReadOptions

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

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.



1652
1653
1654
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1652

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

Instance Attribute Details

#read_consistencyString

The non-transactional read consistency to use. Corresponds to the JSON property readConsistency

Returns:

  • (String)


1637
1638
1639
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1637

def read_consistency
  @read_consistency
end

#read_timeString

Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode. Corresponds to the JSON property readTime

Returns:

  • (String)


1643
1644
1645
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1643

def read_time
  @read_time
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)


1650
1651
1652
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1650

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1657
1658
1659
1660
1661
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 1657

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