Class: Google::Apis::DatastoreV1::ReadOptions
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1::ReadOptions
- 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
-
#new_transaction ⇒ Google::Apis::DatastoreV1::TransactionOptions
Options for beginning a new transaction.
-
#read_consistency ⇒ String
The non-transactional read consistency to use.
-
#read_time ⇒ String
Reads entities as they were at the given time.
-
#transaction ⇒ String
The identifier of the transaction in which to read.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReadOptions
constructor
A new instance of ReadOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ReadOptions
Returns a new instance of ReadOptions.
2448 2449 2450 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 2448 def initialize(**args) update!(**args) end |
Instance Attribute Details
#new_transaction ⇒ Google::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
2426 2427 2428 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 2426 def new_transaction @new_transaction end |
#read_consistency ⇒ String
The non-transactional read consistency to use.
Corresponds to the JSON property readConsistency
2431 2432 2433 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 2431 def read_consistency @read_consistency end |
#read_time ⇒ String
Reads entities as they were at the given time. This value is only supported
for Cloud Firestore in Datastore mode. This must be a microsecond precision
timestamp within the past one hour, or if Point-in-Time Recovery is enabled,
can additionally be a whole minute timestamp within the past 7 days.
Corresponds to the JSON property readTime
2439 2440 2441 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 2439 def read_time @read_time end |
#transaction ⇒ String
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.
2446 2447 2448 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 2446 def transaction @transaction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2453 2454 2455 2456 2457 2458 |
# File 'lib/google/apis/datastore_v1/classes.rb', line 2453 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 |