Class: Google::Apis::DatastoreV1beta3::TransactionOptions

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/datastore_v1beta3/classes.rb,
generated/google/apis/datastore_v1beta3/representations.rb,
generated/google/apis/datastore_v1beta3/representations.rb

Overview

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.

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) ⇒ TransactionOptions

Returns a new instance of TransactionOptions



1761
1762
1763
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1761

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

Instance Attribute Details

#read_onlyGoogle::Apis::DatastoreV1beta3::ReadOnly

Options specific to read-only transactions. Corresponds to the JSON property readOnly



1754
1755
1756
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1754

def read_only
  @read_only
end

#read_writeGoogle::Apis::DatastoreV1beta3::ReadWrite

Options specific to read / write transactions. Corresponds to the JSON property readWrite



1759
1760
1761
# File 'generated/google/apis/datastore_v1beta3/classes.rb', line 1759

def read_write
  @read_write
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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