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

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

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

Constructor Details

#initialize(**args) ⇒ TransactionOptions

Returns a new instance of TransactionOptions.



2064
2065
2066
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 2064

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



2057
2058
2059
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 2057

def read_only
  @read_only
end

#read_writeGoogle::Apis::DatastoreV1beta3::ReadWrite

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



2062
2063
2064
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 2062

def read_write
  @read_write
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2069
2070
2071
2072
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 2069

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