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 outlines the `SingleUseOptions` class for Cloud Spanner's C++ client library, focusing on read-only transactions where Spanner manages the read timestamp."],["The latest release candidate for the Spanner C++ client library is version 2.37.0-rc, with numerous prior versions also available for reference, including the current version 2.21.0."],["`SingleUseOptions` allow for non-blocking reads, but they are limited to a single read operation, such as `Client::Read()` or `Client::ExecuteQuery()`."],["`SingleUseOptions` cannot be used to create an application-level `Transaction` and can be configured with `ReadOnlyOptions`, a specific `Timestamp`, or `max_staleness` using `std::chrono::nanoseconds`."],["The `SingleUseOptions` section of the documentation provides three overloads for its constructor; one that takes `ReadOnlyOptions`, another `Timestamp` and finally one for `std::chrono::nanoseconds`."]]],[]]