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-14 UTC."],[[["This document provides reference information for `SingleUseOptions` within the Google Cloud Spanner C++ library, spanning versions from 2.11.0 to the latest release candidate 2.37.0-rc."],["`SingleUseOptions` are used for read-only transactions where Spanner selects the read timestamp within user-defined bounds, enabling non-blocking reads."],["A single-use transaction, defined by `SingleUseOptions`, can only be used with a single read operation, as it requires prior knowledge of which rows will be read."],["`SingleUseOptions` can be configured using different constructors, allowing for the specification of `ReadOnlyOptions`, `Timestamp` for `min_read_timestamp`, or `std::chrono::nanoseconds` for `max_staleness`."],["`SingleUseOptions` can be used with `Client::Read()` and `Client::ExecuteQuery()`, but not to build an application-level `Transaction`."]]],[]]