Reference documentation and code samples for the Cloud Spanner V1 API class Google::Cloud::Spanner::V1::TransactionOptions.
Options to use for transactions.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#exclude_txn_from_change_streams
def exclude_txn_from_change_streams() -> ::Boolean-
(::Boolean) — When
exclude_txn_from_change_streamsis set totrue, it prevents read or write transactions from being tracked in change streams.If the DDL option
allow_txn_exclusionis set totrue, then the updates made within this transaction aren't recorded in the change stream.If you don't set the DDL option
allow_txn_exclusionor if it's set tofalse, then the updates made within this transaction are recorded in the change stream.
When
exclude_txn_from_change_streamsis set tofalseor 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_streamsoption can only be specified for read-write or partitioned DML transactions, otherwise the API returns anINVALID_ARGUMENTerror.
#exclude_txn_from_change_streams=
def exclude_txn_from_change_streams=(value) -> ::Boolean-
value (::Boolean) — When
exclude_txn_from_change_streamsis set totrue, it prevents read or write transactions from being tracked in change streams.If the DDL option
allow_txn_exclusionis set totrue, then the updates made within this transaction aren't recorded in the change stream.If you don't set the DDL option
allow_txn_exclusionor if it's set tofalse, then the updates made within this transaction are recorded in the change stream.
When
exclude_txn_from_change_streamsis set tofalseor 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_streamsoption can only be specified for read-write or partitioned DML transactions, otherwise the API returns anINVALID_ARGUMENTerror.
-
(::Boolean) — When
exclude_txn_from_change_streamsis set totrue, it prevents read or write transactions from being tracked in change streams.If the DDL option
allow_txn_exclusionis set totrue, then the updates made within this transaction aren't recorded in the change stream.If you don't set the DDL option
allow_txn_exclusionor if it's set tofalse, then the updates made within this transaction are recorded in the change stream.
When
exclude_txn_from_change_streamsis set tofalseor 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_streamsoption can only be specified for read-write or partitioned DML transactions, otherwise the API returns anINVALID_ARGUMENTerror.
#isolation_level
def isolation_level() -> ::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel- (::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel) — Isolation level for the transaction.
#isolation_level=
def isolation_level=(value) -> ::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel- value (::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel) — Isolation level for the transaction.
- (::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel) — Isolation level for the transaction.
#partitioned_dml
def partitioned_dml() -> ::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml-
(::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml) — Partitioned DML transaction.
Authorization to begin a Partitioned DML transaction requires
spanner.databases.beginPartitionedDmlTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
partitioned_dml,read_write,read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.
#partitioned_dml=
def partitioned_dml=(value) -> ::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml-
value (::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml) — Partitioned DML transaction.
Authorization to begin a Partitioned DML transaction requires
spanner.databases.beginPartitionedDmlTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
partitioned_dml,read_write,read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml) — Partitioned DML transaction.
Authorization to begin a Partitioned DML transaction requires
spanner.databases.beginPartitionedDmlTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
partitioned_dml,read_write,read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.
#read_only
def read_only() -> ::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly-
(::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly) — Transaction does not write.
Authorization to begin a read-only transaction requires
spanner.databases.beginReadOnlyTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
read_only,read_write,partitioned_dml. If a field in that set is populated, all other fields in the set will automatically be cleared.
#read_only=
def read_only=(value) -> ::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly-
value (::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly) — Transaction does not write.
Authorization to begin a read-only transaction requires
spanner.databases.beginReadOnlyTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
read_only,read_write,partitioned_dml. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly) — Transaction does not write.
Authorization to begin a read-only transaction requires
spanner.databases.beginReadOnlyTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
read_only,read_write,partitioned_dml. If a field in that set is populated, all other fields in the set will automatically be cleared.
#read_write
def read_write() -> ::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite-
(::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite) — Transaction may write.
Authorization to begin a read-write transaction requires
spanner.databases.beginOrRollbackReadWriteTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
read_write,partitioned_dml,read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.
#read_write=
def read_write=(value) -> ::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite-
value (::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite) — Transaction may write.
Authorization to begin a read-write transaction requires
spanner.databases.beginOrRollbackReadWriteTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
read_write,partitioned_dml,read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite) — Transaction may write.
Authorization to begin a read-write transaction requires
spanner.databases.beginOrRollbackReadWriteTransactionpermission on thesessionresource.Note: The following fields are mutually exclusive:
read_write,partitioned_dml,read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.