Class: Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite
- Inherits:
-
Object
- Object
- Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite
- 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
-
#read_lock_mode ⇒ ::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode
Read lock mode for the transaction.
Instance Attribute Details
#read_lock_mode ⇒ ::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode
Returns Read lock mode for the transaction.
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'proto_docs/google/spanner/v1/transaction.rb', line 394 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 |