Class: Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/spanner/v1/transaction.rb

Overview

Message type to initiate a read-write transaction. Currently this transaction type has no options.

Defined Under Namespace

Modules: ReadLockMode

Instance Attribute Summary collapse

Instance Attribute Details

#multiplexed_session_previous_transaction_id::String

Returns Optional. Clients should pass the transaction ID of the previous transaction attempt that was aborted if this transaction is being executed on a multiplexed session. This feature is not yet supported and will result in an UNIMPLEMENTED error.

Returns:

  • (::String)

    Optional. Clients should pass the transaction ID of the previous transaction attempt that was aborted if this transaction is being executed on a multiplexed session. This feature is not yet supported and will result in an UNIMPLEMENTED error.



401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'proto_docs/google/spanner/v1/transaction.rb', line 401

class ReadWrite
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # `ReadLockMode` is used to set the read lock mode for read-write
  # transactions.
  module ReadLockMode
    # Default value.
    #
    # If the value is not specified, the pessimistic read lock is used.
    READ_LOCK_MODE_UNSPECIFIED = 0

    # Pessimistic lock mode.
    #
    # Read locks are acquired immediately on read.
    PESSIMISTIC = 1

    # Optimistic lock mode.
    #
    # Locks for reads within the transaction are not acquired on read.
    # Instead the locks are acquired on a commit to validate that
    # read/queried data has not changed since the transaction started.
    OPTIMISTIC = 2
  end
end

#read_lock_mode::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode

Returns Read lock mode for the transaction.

Returns:



401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'proto_docs/google/spanner/v1/transaction.rb', line 401

class ReadWrite
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # `ReadLockMode` is used to set the read lock mode for read-write
  # transactions.
  module ReadLockMode
    # Default value.
    #
    # If the value is not specified, the pessimistic read lock is used.
    READ_LOCK_MODE_UNSPECIFIED = 0

    # Pessimistic lock mode.
    #
    # Read locks are acquired immediately on read.
    PESSIMISTIC = 1

    # Optimistic lock mode.
    #
    # Locks for reads within the transaction are not acquired on read.
    # Instead the locks are acquired on a commit to validate that
    # read/queried data has not changed since the transaction started.
    OPTIMISTIC = 2
  end
end