Google Cloud Spanner C++ Client  1.42.0
A C++ Client Library for Google Cloud Spanner
Public Member Functions | List of all members
google::cloud::spanner::Transaction::SingleUseOptions Class Reference

Options for "single-use", ReadOnly transactions, where Spanner chooses the read timestamp, subject to user-provided bounds. More...

#include <google/cloud/spanner/transaction.h>

Public Member Functions

 SingleUseOptions (ReadOnlyOptions opts)
 
 SingleUseOptions (Timestamp min_read_timestamp)
 
 SingleUseOptions (std::chrono::nanoseconds max_staleness)
 

Detailed Description

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.

Definition at line 108 of file transaction.h.

Constructor & Destructor Documentation

◆ SingleUseOptions() [1/3]

google::cloud::spanner::Transaction::SingleUseOptions::SingleUseOptions ( ReadOnlyOptions  opts)

◆ SingleUseOptions() [2/3]

google::cloud::spanner::Transaction::SingleUseOptions::SingleUseOptions ( Timestamp  min_read_timestamp)
explicit

◆ SingleUseOptions() [3/3]

google::cloud::spanner::Transaction::SingleUseOptions::SingleUseOptions ( std::chrono::nanoseconds  max_staleness)
explicit