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 | |
---|---|
Name | Description |
opts |
ReadOnlyOptions
|
SingleUseOptions(Timestamp)
Parameter | |
---|---|
Name | Description |
min_read_timestamp |
Timestamp
|
SingleUseOptions(std::chrono::nanoseconds)
Parameter | |
---|---|
Name | Description |
max_staleness |
std::chrono::nanoseconds
|