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 page provides documentation for `SingleUseOptions` within the Google Cloud Spanner C++ library, detailing its usage for read-only transactions."],["`SingleUseOptions` allows for reading data without blocking, where Spanner automatically selects the read timestamp, subject to the constraints provided by the user."],["A single-use transaction is limited to only one read operation and is primarily used with `Client::Read()` and `Client::ExecuteQuery()` methods."],["The `SingleUseOptions` class offers constructors that accept `ReadOnlyOptions`, `Timestamp`, or `std::chrono::nanoseconds` to configure the read operations."],["The page documents multiple versions of `SingleUseOptions` in the library, ranging from the latest release candidate version 2.37.0-rc, down to version 2.11.0."]]],[]]