Cloud Spanner V1 API - Class Google::Cloud::Spanner::V1::TransactionOptions (v1.10.0)

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
Returns
  • (::Boolean) — 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.

#exclude_txn_from_change_streams=

def exclude_txn_from_change_streams=(value) -> ::Boolean
Parameter
  • value (::Boolean) — 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.

Returns
  • (::Boolean) — 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.

#isolation_level

def isolation_level() -> ::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel
Returns

#isolation_level=

def isolation_level=(value) -> ::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel
Parameter
Returns

#partitioned_dml

def partitioned_dml() -> ::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml
Returns
  • (::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml) — Partitioned DML transaction.

    Authorization to begin a Partitioned DML transaction requires spanner.databases.beginPartitionedDmlTransaction permission on the session resource.

    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
Parameter
  • value (::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml) — Partitioned DML transaction.

    Authorization to begin a Partitioned DML transaction requires spanner.databases.beginPartitionedDmlTransaction permission on the session resource.

    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.

Returns
  • (::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml) — Partitioned DML transaction.

    Authorization to begin a Partitioned DML transaction requires spanner.databases.beginPartitionedDmlTransaction permission on the session resource.

    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
Returns
  • (::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly) — Transaction does not write.

    Authorization to begin a read-only transaction requires spanner.databases.beginReadOnlyTransaction permission on the session resource.

    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
Parameter
  • value (::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly) — Transaction does not write.

    Authorization to begin a read-only transaction requires spanner.databases.beginReadOnlyTransaction permission on the session resource.

    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.

Returns
  • (::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly) — Transaction does not write.

    Authorization to begin a read-only transaction requires spanner.databases.beginReadOnlyTransaction permission on the session resource.

    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
Returns
  • (::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite) — Transaction may write.

    Authorization to begin a read-write transaction requires spanner.databases.beginOrRollbackReadWriteTransaction permission on the session resource.

    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
Parameter
  • value (::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite) — Transaction may write.

    Authorization to begin a read-write transaction requires spanner.databases.beginOrRollbackReadWriteTransaction permission on the session resource.

    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.

Returns
  • (::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite) — Transaction may write.

    Authorization to begin a read-write transaction requires spanner.databases.beginOrRollbackReadWriteTransaction permission on the session resource.

    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.