Module: Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode

Defined in:
proto_docs/google/spanner/v1/transaction.rb

Overview

ReadLockMode is used to set the read lock mode for read-write transactions.

Constant Summary collapse

READ_LOCK_MODE_UNSPECIFIED =

Default value.

0
PESSIMISTIC =

Pessimistic lock mode.

Lock acquisition behavior depends on the isolation level in use. In SERIALIZABLE isolation, reads and writes acquire necessary locks during transaction statement execution. In REPEATABLE_READ isolation, reads that explicitly request to be locked and writes acquire locks. See Concurrency control for details on the types of locks acquired at each transaction step.

1
OPTIMISTIC =

Optimistic lock mode.

Lock acquisition behavior depends on the isolation level in use. In both SERIALIZABLE and REPEATABLE_READ isolation, reads and writes do not acquire locks during transaction statement execution. See Concurrency control for details on how the guarantees of each isolation level are provided at commit time.

2