Class SingleUseOptions (2.22.0)

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.

Constructors

SingleUseOptions(ReadOnlyOptions)

Parameter
NameDescription
opts ReadOnlyOptions

SingleUseOptions(Timestamp)

Parameter
NameDescription
min_read_timestamp Timestamp

SingleUseOptions(std::chrono::nanoseconds)

Parameter
NameDescription
max_staleness std::chrono::nanoseconds