Read-only transactions provide guaranteed consistency across several reads,
but do not allow writes. Read-only transactions can be configured to read at
timestamps in the past. Read-only transactions do not need to be committed and
do not take locks.
ReadWrite
Locking read-write transactions are the only transaction type that support writing
data into Cloud Spanner. These transactions rely on pessimistic locking and, if
necessary, two-phase commit. Locking read-write transactions may abort, requiring
the application to retry.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This page details the `TransactionMode` enum within the `Google.Cloud.Spanner.Data` namespace, which is used to define the mode of transactions in Cloud Spanner."],["The latest version documented is 5.0.0-beta05, with several previous versions listed, including the currently selected 3.13.0."],["`TransactionMode` offers two primary modes: `ReadOnly`, for consistent reads without writes, and `ReadWrite`, for transactions that support writing data using pessimistic locking."],["The list provided goes back as far as version 3.5.0, and includes other versions such as 4.0.0, 4.5.0 and 4.6.0."]]],[]]