Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
Public Member Functions | List of all members
google::cloud::spanner::v1::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::v1::Transaction::SingleUseOptions::SingleUseOptions ( ReadOnlyOptions  opts)

Definition at line 78 of file transaction.cc.

◆ SingleUseOptions() [2/3]

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

Definition at line 82 of file transaction.cc.

◆ SingleUseOptions() [3/3]

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

Definition at line 88 of file transaction.cc.