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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available is 5.0.0-beta05, while version 3.7.0 is the current primary version.\u003c/p\u003e\n"],["\u003cp\u003eThe provided content lists several versions of Google.Cloud.Spanner.Data, ranging from 3.5.0 up to 5.0.0-beta05.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransactionMode\u003c/code\u003e enum in Google.Cloud.Spanner.Data.dll allows setting the mode of the transactions.\u003c/p\u003e\n"],["\u003cp\u003eThere are two transaction modes, \u003ccode\u003eReadOnly\u003c/code\u003e, which only supports reading and provides consistency across multiple reads, and \u003ccode\u003eReadWrite\u003c/code\u003e, which supports both reading and writing data using pessimistic locking.\u003c/p\u003e\n"]]],[],null,[]]