Class: Google::Apis::SpannerV1::TransactionOptions
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::TransactionOptions
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
Options to use for transactions.
Instance Attribute Summary collapse
-
#exclude_txn_from_change_streams ⇒ Boolean
(also: #exclude_txn_from_change_streams?)
When
exclude_txn_from_change_streamsis set totrue, it prevents read or write transactions from being tracked in change streams. -
#isolation_level ⇒ String
Isolation level for the transaction.
-
#partitioned_dml ⇒ Google::Apis::SpannerV1::PartitionedDml
Message type to initiate a Partitioned DML transaction.
-
#read_only ⇒ Google::Apis::SpannerV1::ReadOnly
Message type to initiate a read-only transaction.
-
#read_write ⇒ Google::Apis::SpannerV1::ReadWrite
Message type to initiate a read-write transaction.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TransactionOptions
constructor
A new instance of TransactionOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TransactionOptions
Returns a new instance of TransactionOptions.
7021 7022 7023 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7021 def initialize(**args) update!(**args) end |
Instance Attribute Details
#exclude_txn_from_change_streams ⇒ Boolean Also known as: exclude_txn_from_change_streams?
When exclude_txn_from_change_streams is set to true, it prevents read or
write transactions from being tracked in change streams. * If the DDL option
allow_txn_exclusion is set to true, then the updates made within this
transaction aren't recorded in the change stream. * If you don't set the DDL
option allow_txn_exclusion or if it's set to false, then the updates made
within this transaction are recorded in the change stream. When
exclude_txn_from_change_streams is set to false or not set, modifications
from this transaction are recorded in all change streams that are tracking
columns modified by these transactions. The exclude_txn_from_change_streams
option can only be specified for read-write or partitioned DML transactions,
otherwise the API returns an INVALID_ARGUMENT error.
Corresponds to the JSON property excludeTxnFromChangeStreams
6997 6998 6999 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6997 def exclude_txn_from_change_streams @exclude_txn_from_change_streams end |
#isolation_level ⇒ String
Isolation level for the transaction.
Corresponds to the JSON property isolationLevel
7003 7004 7005 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7003 def isolation_level @isolation_level end |
#partitioned_dml ⇒ Google::Apis::SpannerV1::PartitionedDml
Message type to initiate a Partitioned DML transaction.
Corresponds to the JSON property partitionedDml
7008 7009 7010 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7008 def partitioned_dml @partitioned_dml end |
#read_only ⇒ Google::Apis::SpannerV1::ReadOnly
Message type to initiate a read-only transaction.
Corresponds to the JSON property readOnly
7013 7014 7015 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7013 def read_only @read_only end |
#read_write ⇒ Google::Apis::SpannerV1::ReadWrite
Message type to initiate a read-write transaction. Currently this transaction
type has no options.
Corresponds to the JSON property readWrite
7019 7020 7021 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7019 def read_write @read_write end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7026 7027 7028 7029 7030 7031 7032 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7026 def update!(**args) @exclude_txn_from_change_streams = args[:exclude_txn_from_change_streams] if args.key?(:exclude_txn_from_change_streams) @isolation_level = args[:isolation_level] if args.key?(:isolation_level) @partitioned_dml = args[:partitioned_dml] if args.key?(:partitioned_dml) @read_only = args[:read_only] if args.key?(:read_only) @read_write = args[:read_write] if args.key?(:read_write) end |