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.
If the value is not specified, the pessimistic read lock is used.
0
- PESSIMISTIC =
Pessimistic lock mode.
Read locks are acquired immediately on read.
1
- OPTIMISTIC =
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.
2