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-04-09 UTC."],[[["This webpage details the `SingleUseOptions` for read-only transactions in Google Cloud Spanner, with version 2.37.0-rc as the latest available version."],["`SingleUseOptions` are used for read-only transactions where Spanner determines the read timestamp within user-defined bounds, enabling non-blocking reads."],["A single-use transaction, using `SingleUseOptions`, is limited to one read operation because selecting the timestamp depends on knowing which rows will be read, and is compatible with `Client::Read()` and `Client::ExecuteQuery()`."],["`SingleUseOptions` can be constructed using `ReadOnlyOptions`, a `Timestamp`, or `std::chrono::nanoseconds` to specify parameters like `max_staleness` and `min_read_timestamp`."],["`SingleUseOptions` cannot be used to construct a general application-level `Transaction` in Cloud Spanner."]]],[]]