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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datastore_v1/classes.rb,
lib/google/apis/datastore_v1/representations.rb,
lib/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.



2158
2159
2160
# File 'lib/google/apis/datastore_v1/classes.rb', line 2158

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

Instance Attribute Details

#new_transactionGoogle::Apis::DatastoreV1::TransactionOptions

Options for beginning a new transaction. Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests. Corresponds to the JSON property newTransaction



2138
2139
2140
# File 'lib/google/apis/datastore_v1/classes.rb', line 2138

def new_transaction
  @new_transaction
end

#read_consistencyString

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

Returns:

  • (String)


2143
2144
2145
# File 'lib/google/apis/datastore_v1/classes.rb', line 2143

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)


2149
2150
2151
# File 'lib/google/apis/datastore_v1/classes.rb', line 2149

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)


2156
2157
2158
# File 'lib/google/apis/datastore_v1/classes.rb', line 2156

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2163
2164
2165
2166
2167
2168
# File 'lib/google/apis/datastore_v1/classes.rb', line 2163

def update!(**args)
  @new_transaction = args[:new_transaction] if args.key?(:new_transaction)
  @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