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.
7028 7029 7030 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7028 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
7004 7005 7006 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7004 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
7010 7011 7012 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7010 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
7015 7016 7017 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7015 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
7020 7021 7022 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7020 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
7026 7027 7028 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7026 def read_write @read_write end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7033 7034 7035 7036 7037 7038 7039 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 7033 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 |