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"]],[["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-07-18 UTC."],[[["This document provides a versioned history of the `SingleUseOptions` class within the Google Cloud Spanner C++ client library, ranging from version 2.11.0 up to the latest release candidate 2.37.0-rc."],["`SingleUseOptions` are used for \"single-use,\" read-only transactions in Spanner, enabling reads without blocking by letting Spanner pick the read timestamp within specified bounds."],["Single-use transactions can only be used with a single read operation, as seen with the `Client::Read()` and `Client::ExecuteQuery()` methods."],["`SingleUseOptions` cannot be used to make an application level `Transaction`."],["The document outlines three constructors for `SingleUseOptions`, taking `ReadOnlyOptions`, `Timestamp` for a minimum read timestamp, or `std::chrono::nanoseconds` for maximum staleness."]]],[]]