Options for "single-use", ReadOnly transactions, where Spanner chooses the read timestamp, subject to user-provided bounds.
This allows reading without blocking.
Because selection of the timestamp requires knowledge of which rows will be read, a single-use transaction can only be used with one read. See Client::Read() and Client::ExecuteQuery(). SingleUseOptions cannot be used to construct an application-level Transaction.
[[["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-03-21 UTC."],[[["This page details the `SingleUseOptions` for read-only transactions in Google Cloud Spanner, with a focus on various versions of the C++ client library."],["The `SingleUseOptions` allow reading data without blocking, with Spanner selecting the read timestamp based on user-defined bounds."],["A single-use transaction is limited to one read operation because it needs to determine which rows are being read to make a selection for the timestamp."],["The `SingleUseOptions` cannot be used to build an application level `Transaction` and is mainly used with the `Client::Read()` and `Client::ExecuteQuery()`."],["The page provides versioned documentation and covers the constructors of `SingleUseOptions`, which includes the use of `ReadOnlyOptions`, `Timestamp`, and `std::chrono::nanoseconds`."]]],[]]