Google Cloud Spanner C++ Client
1.32.0
A C++ Client Library for Google Cloud Spanner
|
The inlined, versioned namespace for the Cloud Spanner C++ client APIs. More...
Classes | |
class | Backup |
This class identifies a Cloud Spanner Backup. More... | |
class | Bytes |
A representation of the Spanner BYTES type: variable-length binary data. More... | |
class | Client |
Performs database client operations on Spanner. More... | |
struct | SpannerRetryPolicyOption |
Option for google::cloud::Options to set a spanner::RetryPolicy . More... | |
struct | SpannerBackoffPolicyOption |
Option for google::cloud::Options to set a spanner::BackoffPolicy . More... | |
struct | SpannerPollingPolicyOption |
Option for google::cloud::Options to set a spanner::PollingPolicy . More... | |
struct | SessionPoolMinSessionsOption |
Option for google::cloud::Options to set the minimum number of sessions to keep in the pool. More... | |
struct | SessionPoolMaxSessionsPerChannelOption |
Option for google::cloud::Options to set the maximum number of sessions to create on each channel. More... | |
struct | SessionPoolMaxIdleSessionsOption |
Option for google::cloud::Options to set the maximum number of sessions to keep in the pool in an idle state. More... | |
struct | SessionPoolActionOnExhaustionOption |
Option for google::cloud::Options to set the action to take when attempting to allocate a session when the pool is exhausted. More... | |
struct | SessionPoolKeepAliveIntervalOption |
Option for google::cloud::Options to set the interval at which we refresh sessions so they don't get collected by the backend GC. More... | |
struct | SessionPoolLabelsOption |
Option for google::cloud::Options to set the labels used when creating sessions within the pool. More... | |
struct | RequestPriorityOption |
Option for google::cloud::Options to set a spanner::RequestPriority . More... | |
struct | RequestTagOption |
Option for google::cloud::Options to set a per-request tag. More... | |
class | Transaction |
The representation of a Cloud Spanner transaction. More... | |
struct | ConnectionOptionsTraits |
The traits to configure ConnectionOptions<T> for Cloud Spanner. More... | |
class | Database |
This class identifies a Cloud Spanner Database. More... | |
class | DatabaseAdminClient |
Performs database administration operations on Spanner. More... | |
class | Timestamp |
A representation of the Spanner TIMESTAMP type: An instant in time. More... | |
struct | CommitTimestamp |
A sentinel type used to update a commit timestamp column. More... | |
class | DatabaseAdminConnection |
A connection to the Cloud Spanner instance administration service. More... | |
class | Instance |
This class identifies a Cloud Spanner Instance. More... | |
class | InstanceAdminClient |
Performs instance administration operations on Cloud Spanner. More... | |
class | InstanceAdminConnection |
A connection to the Cloud Spanner instance administration service. More... | |
class | KeyBound |
The KeyBound class is a regular type that represents an open or closed endpoint for a range of keys. More... | |
class | KeySet |
The KeySet class is a regular type that represents a collection of Key s. More... | |
class | Value |
The Value class represents a type-safe, nullable Spanner value. More... | |
class | Mutation |
A wrapper for Cloud Spanner mutations. More... | |
class | Numeric |
A representation of the Spanner NUMERIC type: an exact numeric value with 29 decimal digits of integer precision (kIntPrec) and 9 decimal digits of fractional precision (kFracPrec). More... | |
struct | PartitionOptions |
Options passed to Client::PartitionRead or Client::PartitionQuery . More... | |
class | QueryPartition |
The QueryPartition class is a regular type that represents a single slice of a parallel SQL read. More... | |
struct | BatchDmlResult |
The result of executing a batch of DML statements. More... | |
class | ClientOptions |
ClientOptions allows the caller to set a variety of options when constructing a Client instance. More... | |
class | CommitOptions |
Set options on calls to spanner::Client::Commit() . More... | |
struct | CommitStats |
Statistics returned for a committed Transaction. More... | |
struct | CommitResult |
The result of committing a Transaction. More... | |
class | Connection |
A connection to a Spanner database instance. More... | |
class | Json |
A simple representation for the Spanner JSON type: a lightweight, text-based, language-independent data interchange format. More... | |
class | QueryOptions |
These QueryOptions allow users to configure features about how their SQL queries executes on the server. More... | |
class | SqlStatement |
Represents a potentially parameterized SQL statement. More... | |
struct | ReadOptions |
Options passed to Client::Read or Client::PartitionRead . More... | |
class | ReadPartition |
The ReadPartition class is a regular type that represents a single slice of a parallel Read operation. More... | |
class | RowStream |
Represents the stream of Rows returned from spanner::Client::Read() or spanner::Client::ExecuteQuery() . More... | |
class | DmlResult |
Represents the result of a data modifying operation using spanner::Client::ExecuteDml() . More... | |
class | ProfileQueryResult |
Represents the stream of Rows and profile stats returned from spanner::Client::ProfileQuery() . More... | |
class | ProfileDmlResult |
Represents the result and profile stats of a data modifying operation using spanner::Client::ProfileDml() . More... | |
class | SessionPoolOptions |
Controls the session pool maintained by a spanner::Client . More... | |
struct | PartitionedDmlResult |
The result of executing a Partitioned DML query. More... | |
class | Row |
A Row is a sequence of columns each with a name and an associated Value . More... | |
class | RowStreamIterator |
A RowStreamIterator is an Input Iterator (see below) that returns a sequence of StatusOr<Row> objects. More... | |
class | TupleStreamIterator |
A TupleStreamIterator<Tuple> is an "Input Iterator" that wraps a RowStreamIterator , parsing its elements into a sequence of StatusOr<Tuple> objects. More... | |
class | TupleStream |
A TupleStream<Tuple> defines a range that parses Tuple objects from the given range of RowStreamIterator s. More... | |
class | CreateInstanceRequestBuilder |
CreateInstanceRequestBuilder is a builder class for google::spanner::admin::instance::v1::CreateInstanceRequest More... | |
class | UpdateInstanceRequestBuilder |
UpdateInstanceRequestBuilder is a builder class for google::spanner::admin::instance::v1::UpdateInstanceRequest More... | |
class | DefaultEncryption |
Use the per-operation default encryption: More... | |
class | GoogleEncryption |
Use Google default encryption. More... | |
class | CustomerManagedEncryption |
Use encryption with encryption_key . More... | |
Typedefs | |
using | SpannerPolicyOptionList = OptionList< spanner::SpannerRetryPolicyOption, SpannerBackoffPolicyOption, SpannerPollingPolicyOption > |
List of all "policy" options. More... | |
using | SessionPoolOptionList = OptionList< SessionPoolMinSessionsOption, SessionPoolMaxSessionsPerChannelOption, SessionPoolMaxIdleSessionsOption, SessionPoolActionOnExhaustionOption, SessionPoolKeepAliveIntervalOption, SessionPoolLabelsOption > |
List of all SessionPool options. More... | |
using | RequestOptionList = OptionList< RequestPriorityOption, RequestTagOption > |
List of all Request options. More... | |
using | RetryPolicy = ::google::cloud::internal::TraitBasedRetryPolicy< spanner_internal::SafeGrpcRetry > |
The base class for retry policies. More... | |
using | LimitedTimeRetryPolicy = ::google::cloud::internal::LimitedTimeRetryPolicy< spanner_internal::SafeGrpcRetry > |
A retry policy that limits based on time. More... | |
using | LimitedErrorCountRetryPolicy = google::cloud::internal::LimitedErrorCountRetryPolicy< spanner_internal::SafeGrpcRetry > |
A retry policy that limits the number of times a request can fail. More... | |
using | TransactionRerunPolicy = ::google::cloud::internal::TraitBasedRetryPolicy< spanner_internal::SafeTransactionRerun > |
The base class for transaction rerun policies. More... | |
using | LimitedTimeTransactionRerunPolicy = google::cloud::internal::LimitedTimeRetryPolicy< spanner_internal::SafeTransactionRerun > |
A transaction rerun policy that limits the duration of the rerun loop. More... | |
using | LimitedErrorCountTransactionRerunPolicy = google::cloud::internal::LimitedErrorCountRetryPolicy< spanner_internal::SafeTransactionRerun > |
A transaction rerun policy that limits the number of failures. More... | |
using | ConnectionOptions = google::cloud::ConnectionOptions< ConnectionOptionsTraits > |
The options for Cloud Spanner connections. More... | |
template<typename Duration > | |
using | sys_time = std::chrono::time_point< std::chrono::system_clock, Duration > |
Convenience alias. More... | |
using | ListDatabaseRange = ::google::cloud::internal::PaginationRange< google::spanner::admin::database::v1::Database > |
An input range to stream all the databases in a Cloud Spanner instance. More... | |
using | ListBackupOperationsRange = google::cloud::internal::PaginationRange< google::longrunning::Operation > |
An input range to stream backup operations in Cloud Spanner instance. More... | |
using | ListDatabaseOperationsRange = google::cloud::internal::PaginationRange< google::longrunning::Operation > |
An input range to stream database operations in Cloud Spanner instance. More... | |
using | ListBackupsRange = ::google::cloud::internal::PaginationRange< google::spanner::admin::database::v1::Backup > |
An input range to stream backups in Cloud Spanner instance. More... | |
using | BackoffPolicy = ::google::cloud::internal::BackoffPolicy |
The base class for backoff policies. More... | |
using | ExponentialBackoffPolicy = google::cloud::internal::ExponentialBackoffPolicy |
A truncated exponential backoff policy with randomized periods. More... | |
using | PollingPolicy = ::google::cloud::PollingPolicy |
template<typename Retry = LimitedTimeRetryPolicy, typename Backoff = ExponentialBackoffPolicy> | |
using | GenericPollingPolicy = ::google::cloud::GenericPollingPolicy< Retry, Backoff > |
using | ListInstancesRange = ::google::cloud::internal::PaginationRange< google::spanner::admin::instance::v1::Instance > |
An input range to stream all the instances in a Cloud project. More... | |
using | ListInstanceConfigsRange = ::google::cloud::internal::PaginationRange< google::spanner::admin::instance::v1::InstanceConfig > |
An input range to stream all the instance configs in a Cloud project. More... | |
using | Key = std::vector< Value > |
A Key is a collection of Value objects where the i'th value corresponds to the i'th component of the table or primary index key. More... | |
using | Mutations = std::vector< Mutation > |
An ordered sequence of mutations to pass to Client::Commit() or return from the Client::Commit() mutator. More... | |
using | InsertMutationBuilder = spanner_internal::WriteMutationBuilder< spanner_internal::InsertOp > |
A helper class to construct "insert" mutations. More... | |
using | UpdateMutationBuilder = spanner_internal::WriteMutationBuilder< spanner_internal::UpdateOp > |
A helper class to construct "update" mutations. More... | |
using | InsertOrUpdateMutationBuilder = spanner_internal::WriteMutationBuilder< spanner_internal::InsertOrUpdateOp > |
A helper class to construct "insert_or_update" mutations. More... | |
using | ReplaceMutationBuilder = spanner_internal::WriteMutationBuilder< spanner_internal::ReplaceOp > |
A helper class to construct "replace" mutations. More... | |
using | DeleteMutationBuilder = spanner_internal::DeleteMutationBuilder |
A helper class to construct "delete" mutations. More... | |
using | Date = ::absl::CivilDay |
Represents a date in the proleptic Gregorian calendar as a triple of year, month (1-12), and day (1-31). More... | |
using | ExecutionPlan = ::google::spanner::v1::QueryPlan |
Contains a hierarchical representation of the operations the database server performs in order to execute a particular SQL statement. More... | |
using | EncryptionConfig = absl::variant< DefaultEncryption, GoogleEncryption, CustomerManagedEncryption > |
Specify the encryption configuration for any of the following operations: More... | |
using | IamUpdater = ::google::cloud::IamUpdater |
Type alias for google::cloud::IamUpdater. More... | |
using | TracingOptions = ::google::cloud::TracingOptions |
The configuration parameters for RPC/protobuf tracing. More... | |
Enumerations | |
enum class | ActionOnExhaustion { kBlock , kFail } |
Action to take when the session pool is exhausted. More... | |
enum class | RequestPriority { kLow , kMedium , kHigh } |
Functions | |
bool | operator== (Backup const &a, Backup const &b) |
bool | operator!= (Backup const &a, Backup const &b) |
std::ostream & | operator<< (std::ostream &os, Backup const &bu) |
StatusOr< Backup > | MakeBackup (std::string const &full_name) |
Constructs a Backup from the given full_name . More... | |
std::ostream & | operator<< (std::ostream &os, Bytes const &bytes) |
constexpr int | VersionMajor () |
The Cloud spanner C++ Client major version. More... | |
constexpr int | VersionMinor () |
The Cloud spanner C++ Client minor version. More... | |
constexpr int | VersionPatch () |
The Cloud spanner C++ Client patch version. More... | |
constexpr int | Version () |
A single integer representing the Major/Minor/Patch version. More... | |
std::string | VersionString () |
The version as a string, in MAJOR.MINOR.PATCH+gitrev format. More... | |
std::shared_ptr< spanner::Connection > | MakeConnection (spanner::Database const &db, Options opts={}) |
Returns a Connection object that can be used for interacting with Spanner. More... | |
std::shared_ptr< Connection > | MakeConnection (Database const &db, ConnectionOptions const &connection_options, SessionPoolOptions session_pool_options=SessionPoolOptions()) |
Returns a Connection object that can be used for interacting with Spanner. More... | |
std::shared_ptr< Connection > | MakeConnection (Database const &db, ConnectionOptions const &connection_options, SessionPoolOptions session_pool_options, std::unique_ptr< RetryPolicy > retry_policy, std::unique_ptr< BackoffPolicy > backoff_policy) |
Returns a Connection object that can be used for interacting with Spanner. More... | |
Transaction | MakeReadOnlyTransaction (Transaction::ReadOnlyOptions opts={}) |
Create a read-only transaction configured with opts . More... | |
Transaction | MakeReadWriteTransaction (Transaction::ReadWriteOptions opts={}) |
Create a read-write transaction configured with opts . More... | |
Transaction | MakeReadWriteTransaction (Transaction const &txn, Transaction::ReadWriteOptions opts={}) |
Create a read-write transaction configured with opts , and sharing lock priority with txn . More... | |
bool | operator== (Database const &a, Database const &b) |
bool | operator!= (Database const &a, Database const &b) |
std::ostream & | operator<< (std::ostream &os, Database const &db) |
StatusOr< Database > | MakeDatabase (std::string const &full_name) |
Constructs a Database from the given full_name . More... | |
StatusOr< Timestamp > | MakeTimestamp (absl::Time) |
Construct a Timestamp from an absl::Time . More... | |
StatusOr< Timestamp > | MakeTimestamp (protobuf::Timestamp const &) |
Construct a Timestamp from a google::protobuf::Timestamp . More... | |
template<typename Duration > | |
StatusOr< Timestamp > | MakeTimestamp (sys_time< Duration > const &tp) |
Construct a Timestamp from a std::chrono::time_point on the system clock. More... | |
std::shared_ptr< spanner::DatabaseAdminConnection > | MakeDatabaseAdminConnection (Options opts={}) |
Returns a DatabaseAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs. More... | |
std::shared_ptr< DatabaseAdminConnection > | MakeDatabaseAdminConnection (ConnectionOptions const &options) |
Returns a DatabaseAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs. More... | |
std::shared_ptr< DatabaseAdminConnection > | MakeDatabaseAdminConnection (ConnectionOptions const &options, std::unique_ptr< RetryPolicy > retry_policy, std::unique_ptr< BackoffPolicy > backoff_policy, std::unique_ptr< PollingPolicy > polling_policy) |
Returns a DatabaseAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs. More... | |
bool | operator== (Instance const &a, Instance const &b) |
bool | operator!= (Instance const &a, Instance const &b) |
std::ostream & | operator<< (std::ostream &os, Instance const &in) |
StatusOr< Instance > | MakeInstance (std::string const &full_name) |
Constructs an Instance from the given full_name . More... | |
std::shared_ptr< spanner::InstanceAdminConnection > | MakeInstanceAdminConnection (Options opts={}) |
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs. More... | |
std::shared_ptr< InstanceAdminConnection > | MakeInstanceAdminConnection (ConnectionOptions const &options) |
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs. More... | |
std::shared_ptr< InstanceAdminConnection > | MakeInstanceAdminConnection (ConnectionOptions const &options, std::unique_ptr< RetryPolicy > retry_policy, std::unique_ptr< BackoffPolicy > backoff_policy, std::unique_ptr< PollingPolicy > polling_policy) |
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs. More... | |
bool | operator== (KeyBound const &a, KeyBound const &b) |
bool | operator== (KeySet const &a, KeySet const &b) |
template<typename... Ts> | |
Key | MakeKey (Ts &&... ts) |
Constructs a Key from the given arguments. More... | |
template<typename... Ts> | |
KeyBound | MakeKeyBoundClosed (Ts &&... ts) |
Returns a "closed" KeyBound with a Key constructed from the given arguments. More... | |
template<typename... Ts> | |
KeyBound | MakeKeyBoundOpen (Ts &&... ts) |
Returns an "open" KeyBound with a Key constructed from the given arguments. More... | |
template<typename T > | |
Value | MakeNullValue () |
Factory to construct a "null" Value of the specified type T . More... | |
bool | operator== (Mutation const &lhs, Mutation const &rhs) |
void | PrintTo (Mutation const &m, std::ostream *os) |
template<typename... Ts> | |
Mutation | MakeInsertMutation (std::string table_name, std::vector< std::string > columns, Ts &&... values) |
Creates a simple insert mutation for the values in values . More... | |
template<typename... Ts> | |
Mutation | MakeUpdateMutation (std::string table_name, std::vector< std::string > columns, Ts &&... values) |
Creates a simple update mutation for the values in values . More... | |
template<typename... Ts> | |
Mutation | MakeInsertOrUpdateMutation (std::string table_name, std::vector< std::string > columns, Ts &&... values) |
Creates a simple "insert or update" mutation for the values in values . More... | |
template<typename... Ts> | |
Mutation | MakeReplaceMutation (std::string table_name, std::vector< std::string > columns, Ts &&... values) |
Creates a simple "replace" mutation for the values in values . More... | |
Mutation | MakeDeleteMutation (std::string table_name, KeySet keys) |
Creates a simple "delete" mutation for the values in keys . More... | |
StatusOr< Numeric > | MakeNumeric (std::string s) |
Construction from a string, in decimal fixed- or floating-point formats. More... | |
StatusOr< Numeric > | MakeNumeric (double d) |
Construction from a double. More... | |
template<typename T , typename std::enable_if< std::numeric_limits< T >::is_integer, int >::type = 0> | |
StatusOr< Numeric > | MakeNumeric (T i, int exponent=0) |
Construction from an integer i , scaled by 10^exponent . More... | |
double | ToDouble (Numeric const &n) |
Conversion to the closest double value, with possible loss of precision. More... | |
bool | operator== (PartitionOptions const &a, PartitionOptions const &b) |
bool | operator!= (PartitionOptions const &a, PartitionOptions const &b) |
bool | operator== (QueryPartition const &a, QueryPartition const &b) |
StatusOr< std::string > | SerializeQueryPartition (QueryPartition const &query_partition) |
Serializes an instance of QueryPartition to a string of bytes. More... | |
StatusOr< QueryPartition > | DeserializeQueryPartition (std::string const &serialized_query_partition) |
Deserializes the provided string into a QueryPartition . More... | |
std::ostream & | operator<< (std::ostream &os, Json const &json) |
Outputs a JSON-formatted string to the provided stream. More... | |
bool | operator== (ReadOptions const &lhs, ReadOptions const &rhs) |
bool | operator!= (ReadOptions const &lhs, ReadOptions const &rhs) |
StatusOr< std::string > | SerializeReadPartition (ReadPartition const &read_partition) |
Serializes an instance of ReadPartition to a string of bytes. More... | |
StatusOr< ReadPartition > | DeserializeReadPartition (std::string const &serialized_read_partition) |
Deserializes the provided string into a ReadPartition . More... | |
bool | operator== (ReadPartition const &lhs, ReadPartition const &rhs) |
bool | operator!= (ReadPartition const &lhs, ReadPartition const &rhs) |
Row | MakeTestRow (std::vector< std::pair< std::string, Value >> pairs) |
Creates a Row with the specified column names and values. More... | |
template<typename... Ts> | |
Row | MakeTestRow (Ts &&... ts) |
Creates a Row with Value s created from the given arguments and with auto-generated column names. More... | |
template<typename Tuple , typename RowRange > | |
TupleStream< Tuple > | StreamOf (RowRange &&range) |
A factory that creates a TupleStream<Tuple> by wrapping the given range . More... | |
template<typename RowRange > | |
auto | GetSingularRow (RowRange &&range) -> typename std::decay< decltype(*std::forward< RowRange >(range).begin())>::type |
Returns the only row from a range that contains exactly one row. More... | |
bool | operator== (Row const &a, Row const &b) |
bool | operator== (RowStreamIterator const &a, RowStreamIterator const &b) |
bool | operator!= (RowStreamIterator const &a, RowStreamIterator const &b) |
std::ostream & | operator<< (std::ostream &os, SqlStatement const &stmt) |
std::ostream & | operator<< (std::ostream &os, Timestamp ts) |
bool | operator== (Value const &a, Value const &b) |
std::ostream & | operator<< (std::ostream &os, Value const &v) |
template<typename T , typename std::enable_if< std::numeric_limits< T >::is_integer &&!std::numeric_limits< T >::is_signed, int >::type = 0> | |
StatusOr< T > | ToInteger (Numeric const &n, int exponent=0) |
Conversion to the nearest integer value, scaled by 10^exponent . More... | |
Relational operators | |
bool | operator== (Json const &lhs, Json const &rhs) |
bool | operator!= (Json const &lhs, Json const &rhs) |
The inlined, versioned namespace for the Cloud Spanner C++ client APIs.
Applications may need to link multiple versions of the Cloud spanner C++ client, for example, if they link a library that uses an older version of the client than they do. This namespace is inlined, so applications can use spanner::Foo
in their source, but the symbols are versioned, i.e., the symbol becomes spanner::v1::Foo
.
using google::cloud::spanner::v1::BackoffPolicy = typedef ::google::cloud::internal::BackoffPolicy |
The base class for backoff policies.
Definition at line 27 of file backoff_policy.h.
using google::cloud::spanner::v1::ConnectionOptions = typedef google::cloud::ConnectionOptions<ConnectionOptionsTraits> |
The options for Cloud Spanner connections.
See google::cloud::ConnectionOptions<T>
for more details at https://googleapis.dev/cpp/google-cloud-common/latest/
Definition at line 45 of file connection_options.h.
using google::cloud::spanner::v1::Date = typedef ::absl::CivilDay |
Represents a date in the proleptic Gregorian calendar as a triple of year, month (1-12), and day (1-31).
We use absl::CivilDay
to represent a "date". Direct use of absl::CivilDay
is recommended. This alias exists for backward compatibility.
using google::cloud::spanner::v1::DeleteMutationBuilder = typedef spanner_internal::DeleteMutationBuilder |
A helper class to construct "delete" mutations.
Definition at line 355 of file mutations.h.
using google::cloud::spanner::v1::EncryptionConfig = typedef absl::variant<DefaultEncryption, GoogleEncryption, CustomerManagedEncryption> |
Specify the encryption configuration for any of the following operations:
DatabaseAdminClient::CreateDatabase()
DatabaseAdminClient::CreateBackup()
DatabaseAdminClient::RestoreDatabase()
Definition at line 60 of file encryption_config.h.
using google::cloud::spanner::v1::ExecutionPlan = typedef ::google::spanner::v1::QueryPlan |
Contains a hierarchical representation of the operations the database server performs in order to execute a particular SQL statement.
using google::cloud::spanner::v1::ExponentialBackoffPolicy = typedef google::cloud::internal::ExponentialBackoffPolicy |
A truncated exponential backoff policy with randomized periods.
Definition at line 30 of file backoff_policy.h.
using google::cloud::spanner::v1::GenericPollingPolicy = typedef ::google::cloud::GenericPollingPolicy<Retry, Backoff> |
Definition at line 33 of file polling_policy.h.
using google::cloud::spanner::v1::IamUpdater = typedef ::google::cloud::IamUpdater |
Type alias for google::cloud::IamUpdater.
Used in the SetIamPolicy()
read-modify-write cycle of the Spanner admin clients, DatabaseAdminClient
and InstanceAdminClient
, in order to avoid race conditions.
The updater is called with a recently fetched policy, and should either return an empty optional if no changes are required, or return a new policy to be set. In the latter case the control loop will always set the etag
of the new policy to that of the recently fetched one. A failure to update then indicates a race, and the process will repeat.
Definition at line 39 of file iam_updater.h.
using google::cloud::spanner::v1::InsertMutationBuilder = typedef spanner_internal::WriteMutationBuilder<spanner_internal::InsertOp> |
A helper class to construct "insert" mutations.
Definition at line 213 of file mutations.h.
using google::cloud::spanner::v1::InsertOrUpdateMutationBuilder = typedef spanner_internal::WriteMutationBuilder<spanner_internal::InsertOrUpdateOp> |
A helper class to construct "insert_or_update" mutations.
Definition at line 283 of file mutations.h.
using google::cloud::spanner::v1::Key = typedef std::vector<Value> |
using google::cloud::spanner::v1::LimitedErrorCountRetryPolicy = typedef google::cloud::internal::LimitedErrorCountRetryPolicy< spanner_internal::SafeGrpcRetry> |
A retry policy that limits the number of times a request can fail.
Definition at line 86 of file retry_policy.h.
using google::cloud::spanner::v1::LimitedErrorCountTransactionRerunPolicy = typedef google::cloud::internal::LimitedErrorCountRetryPolicy< spanner_internal::SafeTransactionRerun> |
A transaction rerun policy that limits the number of failures.
Definition at line 100 of file retry_policy.h.
using google::cloud::spanner::v1::LimitedTimeRetryPolicy = typedef ::google::cloud::internal::LimitedTimeRetryPolicy< spanner_internal::SafeGrpcRetry> |
A retry policy that limits based on time.
Definition at line 81 of file retry_policy.h.
using google::cloud::spanner::v1::LimitedTimeTransactionRerunPolicy = typedef google::cloud::internal::LimitedTimeRetryPolicy< spanner_internal::SafeTransactionRerun> |
A transaction rerun policy that limits the duration of the rerun loop.
Definition at line 95 of file retry_policy.h.
using google::cloud::spanner::v1::ListBackupOperationsRange = typedef google::cloud::internal::PaginationRange<google::longrunning::Operation> |
An input range to stream backup operations in Cloud Spanner instance.
This type models an input range of google::longrunning::Operation
objects. Applications can make a single pass through the results.
Definition at line 62 of file database_admin_connection.h.
using google::cloud::spanner::v1::ListBackupsRange = typedef ::google::cloud::internal::PaginationRange< google::spanner::admin::database::v1::Backup> |
An input range to stream backups in Cloud Spanner instance.
This type models an input range of google::longrunning::Operation
objects. Applications can make a single pass through the results.
Definition at line 86 of file database_admin_connection.h.
using google::cloud::spanner::v1::ListDatabaseOperationsRange = typedef google::cloud::internal::PaginationRange<google::longrunning::Operation> |
An input range to stream database operations in Cloud Spanner instance.
This type models an input range of google::longrunning::Operation
objects. Applications can make a single pass through the results.
Definition at line 74 of file database_admin_connection.h.
using google::cloud::spanner::v1::ListDatabaseRange = typedef ::google::cloud::internal::PaginationRange< google::spanner::admin::database::v1::Database> |
An input range to stream all the databases in a Cloud Spanner instance.
This type models an input range of google::spanner::admin::v1::Database
objects. Applications can make a single pass through the results.
Definition at line 50 of file database_admin_connection.h.
using google::cloud::spanner::v1::ListInstanceConfigsRange = typedef ::google::cloud::internal::PaginationRange< google::spanner::admin::instance::v1::InstanceConfig> |
An input range to stream all the instance configs in a Cloud project.
This type models an input range of google::spanner::admin::v1::Instance
objects. Applications can make a single pass through the results.
Definition at line 56 of file instance_admin_connection.h.
using google::cloud::spanner::v1::ListInstancesRange = typedef ::google::cloud::internal::PaginationRange< google::spanner::admin::instance::v1::Instance> |
An input range to stream all the instances in a Cloud project.
This type models an input range of google::spanner::admin::v1::Instance
objects. Applications can make a single pass through the results.
Definition at line 44 of file instance_admin_connection.h.
using google::cloud::spanner::v1::Mutations = typedef std::vector<Mutation> |
An ordered sequence of mutations to pass to Client::Commit()
or return from the Client::Commit()
mutator.
Definition at line 99 of file mutations.h.
using google::cloud::spanner::v1::PollingPolicy = typedef ::google::cloud::PollingPolicy |
Definition at line 29 of file polling_policy.h.
using google::cloud::spanner::v1::ReplaceMutationBuilder = typedef spanner_internal::WriteMutationBuilder<spanner_internal::ReplaceOp> |
A helper class to construct "replace" mutations.
Definition at line 320 of file mutations.h.
using google::cloud::spanner::v1::RetryPolicy = typedef ::google::cloud::internal::TraitBasedRetryPolicy< spanner_internal::SafeGrpcRetry> |
The base class for retry policies.
Definition at line 77 of file retry_policy.h.
using google::cloud::spanner::v1::sys_time = typedef std::chrono::time_point<std::chrono::system_clock, Duration> |
using google::cloud::spanner::v1::TracingOptions = typedef ::google::cloud::TracingOptions |
The configuration parameters for RPC/protobuf tracing.
The default options are: single_line_mode=on use_short_repeated_primitives=on truncate_string_field_longer_than=128
Definition at line 34 of file tracing_options.h.
using google::cloud::spanner::v1::TransactionRerunPolicy = typedef ::google::cloud::internal::TraitBasedRetryPolicy< spanner_internal::SafeTransactionRerun> |
The base class for transaction rerun policies.
Definition at line 91 of file retry_policy.h.
using google::cloud::spanner::v1::UpdateMutationBuilder = typedef spanner_internal::WriteMutationBuilder<spanner_internal::UpdateOp> |
A helper class to construct "update" mutations.
Definition at line 248 of file mutations.h.
|
strong |
|
strong |
Enumerator | |
---|---|
kLow | |
kMedium | |
kHigh |
Definition at line 26 of file request_priority.h.
StatusOr< QueryPartition > google::cloud::spanner::v1::DeserializeQueryPartition | ( | std::string const & | serialized_query_partition | ) |
Deserializes the provided string into a QueryPartition
.
The serialized_query_partition
argument must be a string that was previously returned by a call to SerializeQueryPartition()
.
serialized_query_partition |
Definition at line 71 of file query_partition.cc.
StatusOr< ReadPartition > google::cloud::spanner::v1::DeserializeReadPartition | ( | std::string const & | serialized_read_partition | ) |
Deserializes the provided string into a ReadPartition
.
The serialized_read_partition
argument must be a string that was previously returned by a call to SerializeReadPartition()
.
serialized_read_partition | - string representation to be deserialized. |
Definition at line 110 of file read_partition.cc.
auto google::cloud::spanner::v1::GetSingularRow | ( | RowRange && | range | ) | -> typename std::decay< decltype(*std::forward<RowRange>(range).begin())>::type |
Returns the only row from a range that contains exactly one row.
An error is returned if the given range does not contain exactly one row. This is a convenience function that may be useful when the caller knows that a range should contain exactly one row, such as when LIMIT 1
is used in an SQL query, or when a read is performed on a guaranteed unique key such that only a single row could possibly match. In cases where the caller does not know how many rows may be returned, they should instead consume the range in a loop.
RowStreamIterator
is an input iterator, this function may consume the first element in the range, even in cases where an error is returned. But again, this function should not be used if range
might contain multiple rows. StatusOr< Backup > google::cloud::spanner::v1::MakeBackup | ( | std::string const & | full_name | ) |
std::shared_ptr< Connection > google::cloud::spanner::v1::MakeConnection | ( | Database const & | db, |
ConnectionOptions const & | connection_options, | ||
SessionPoolOptions | session_pool_options, | ||
std::unique_ptr< RetryPolicy > | retry_policy, | ||
std::unique_ptr< BackoffPolicy > | backoff_policy | ||
) |
Returns a Connection object that can be used for interacting with Spanner.
The returned connection object should not be used directly, rather it should be given to a Client
instance, and methods should be invoked on Client
.
MakeConnection()
overload that accepts google::cloud::Options
.Connection
db | See Database . |
connection_options | configure the Connection created by this function. |
session_pool_options | (optional) configure the SessionPool created by the Connection . |
MakeConnection()
overload that accepts google::cloud::Options
.retry_policy | override the default RetryPolicy , controls how long the returned Connection object retries requests on transient failures. |
backoff_policy | override the default BackoffPolicy , controls how long the Connection object waits before retrying a failed request. |
std::shared_ptr< Connection > google::cloud::spanner::v1::MakeConnection | ( | Database const & | db, |
ConnectionOptions const & | connection_options, | ||
SessionPoolOptions | session_pool_options = SessionPoolOptions() |
||
) |
Returns a Connection object that can be used for interacting with Spanner.
The returned connection object should not be used directly, rather it should be given to a Client
instance, and methods should be invoked on Client
.
MakeConnection()
overload that accepts google::cloud::Options
.Connection
db | See Database . |
connection_options | configure the Connection created by this function. |
session_pool_options | (optional) configure the SessionPool created by the Connection . |
std::shared_ptr< spanner::Connection > google::cloud::spanner::v1::MakeConnection | ( | spanner::Database const & | db, |
Options | opts = {} |
||
) |
Returns a Connection object that can be used for interacting with Spanner.
The returned connection object should not be used directly; instead it should be given to a Client
instance, and methods should be invoked on Client
.
The optional opts
argument may be used to configure aspects of the returned Connection
. Expected options are any of the types in the following option lists.
google::cloud::CommonOptionList
google::cloud::GrpcOptionList
google::cloud::spanner::SpannerPolicyOptionList
google::cloud::spanner::SessionPoolOptionList
GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes
in the environment and unexpected options will be logged.Connection
db | See Database . |
opts | (optional) configure the Connection created by this function. |
StatusOr< Database > google::cloud::spanner::v1::MakeDatabase | ( | std::string const & | full_name | ) |
Constructs a Database
from the given full_name
.
Returns a non-OK Status if full_name
is improperly formed.
Definition at line 46 of file database.cc.
std::shared_ptr< DatabaseAdminConnection > google::cloud::spanner::v1::MakeDatabaseAdminConnection | ( | ConnectionOptions const & | options | ) |
Returns a DatabaseAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs.
The returned connection object should not be used directly, rather it should be given to a DatabaseAdminClient
instance.
MakeDatabaseAdminConnection()
overload that accepts google::cloud::Options
.DatabaseAdminConnection
options | configure the DatabaseAdminConnection created by this function. |
Definition at line 621 of file database_admin_connection.cc.
std::shared_ptr< DatabaseAdminConnection > google::cloud::spanner::v1::MakeDatabaseAdminConnection | ( | ConnectionOptions const & | options, |
std::unique_ptr< RetryPolicy > | retry_policy, | ||
std::unique_ptr< BackoffPolicy > | backoff_policy, | ||
std::unique_ptr< PollingPolicy > | polling_policy | ||
) |
Returns a DatabaseAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs.
The returned connection object should not be used directly, rather it should be given to a DatabaseAdminClient
instance.
MakeDatabaseAdminConnection()
overload that accepts google::cloud::Options
.options | configure the DatabaseAdminConnection created by this function. |
retry_policy | control for how long (or how many times) are retryable RPCs attempted |
backoff_policy | controls the backoff behavior between retry attempts, typically some form of exponential backoff with jitter |
polling_policy | controls for how often, and how quickly, are long running checked for completion |
Definition at line 626 of file database_admin_connection.cc.
std::shared_ptr< spanner::DatabaseAdminConnection > google::cloud::spanner::v1::MakeDatabaseAdminConnection | ( | Options | opts = {} | ) |
Returns a DatabaseAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs.
The returned connection object should not be used directly; instead it should be given to a DatabaseAdminClient
instance.
The optional opts
argument may be used to configure aspects of the returned DatabaseAdminConnection
. Expected options are any of types in the following option lists.
google::cloud::CommonOptionList
google::cloud::GrpcOptionList
google::cloud::SpannerPolicyOptionList
DatabaseAdminConnection
opts | (optional) configure the DatabaseAdminConnection created by this function. |
Definition at line 611 of file database_admin_connection.cc.
|
inline |
Creates a simple "delete" mutation for the values in keys
.
Definition at line 369 of file mutations.h.
Mutation google::cloud::spanner::v1::MakeInsertMutation | ( | std::string | table_name, |
std::vector< std::string > | columns, | ||
Ts &&... | values | ||
) |
Creates a simple insert mutation for the values in values
.
Definition at line 229 of file mutations.h.
Mutation google::cloud::spanner::v1::MakeInsertOrUpdateMutation | ( | std::string | table_name, |
std::vector< std::string > | columns, | ||
Ts &&... | values | ||
) |
Creates a simple "insert or update" mutation for the values in values
.
Definition at line 299 of file mutations.h.
StatusOr< Instance > google::cloud::spanner::v1::MakeInstance | ( | std::string const & | full_name | ) |
Constructs an Instance
from the given full_name
.
Returns a non-OK Status if full_name
is improperly formed.
Definition at line 44 of file instance.cc.
std::shared_ptr< InstanceAdminConnection > google::cloud::spanner::v1::MakeInstanceAdminConnection | ( | ConnectionOptions const & | options | ) |
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs.
The returned connection object should not be used directly, rather it should be given to a InstanceAdminClient
instance.
MakeInstanceAdminConnection()
overload that accepts google::cloud::Options
.InstanceAdminConnection
options | configure the InstanceAdminConnection created by this function. |
Definition at line 286 of file instance_admin_connection.cc.
std::shared_ptr< InstanceAdminConnection > google::cloud::spanner::v1::MakeInstanceAdminConnection | ( | ConnectionOptions const & | options, |
std::unique_ptr< RetryPolicy > | retry_policy, | ||
std::unique_ptr< BackoffPolicy > | backoff_policy, | ||
std::unique_ptr< PollingPolicy > | polling_policy | ||
) |
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs.
The returned connection object should not be used directly, rather it should be given to a InstanceAdminClient
instance.
MakeInstanceAdminConnection()
overload that accepts google::cloud::Options
.options | configure the InstanceAdminConnection created by this function. |
retry_policy | control for how long (or how many times) are retryable RPCs attempted |
backoff_policy | controls the backoff behavior between retry attempts, typically some form of exponential backoff with jitter |
polling_policy | controls for how often, and how quickly, are long running checked for completion |
Definition at line 291 of file instance_admin_connection.cc.
std::shared_ptr< spanner::InstanceAdminConnection > google::cloud::spanner::v1::MakeInstanceAdminConnection | ( | Options | opts = {} | ) |
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin APIs.
The returned connection object should not be used directly; instead it should be given to a InstanceAdminClient
instance.
The optional opts
argument may be used to configure aspects of the returned InstanceAdminConnection
. Expected options are any of the types in the following option lists.
google::cloud::CommonOptionList
google::cloud::GrpcOptionList
google::cloud::SpannerPolicyOptionList
InstanceAdminConnection
opts | (optional) configure the InstanceAdminConnection created by this function. |
Definition at line 276 of file instance_admin_connection.cc.
Key google::cloud::spanner::v1::MakeKey | ( | Ts &&... | ts | ) |
Constructs a Key
from the given arguments.
KeyBound google::cloud::spanner::v1::MakeKeyBoundClosed | ( | Ts &&... | ts | ) |
Returns a "closed" KeyBound
with a Key
constructed from the given arguments.
KeyBound google::cloud::spanner::v1::MakeKeyBoundOpen | ( | Ts &&... | ts | ) |
Returns an "open" KeyBound
with a Key
constructed from the given arguments.
Value google::cloud::spanner::v1::MakeNullValue | ( | ) |
StatusOr< Numeric > google::cloud::spanner::v1::MakeNumeric | ( | double | d | ) |
Construction from a double.
Fails on NaN or any argument outside the NUMERIC value range (including infinities). If the argument has more than kFracPrec
digits after the decimal point it will be rounded, with halfway cases rounding away from zero.
Definition at line 249 of file numeric.cc.
StatusOr< Numeric > google::cloud::spanner::v1::MakeNumeric | ( | std::string | s | ) |
Construction from a string, in decimal fixed- or floating-point formats.
For example, "0", "-999", "3.141592654", "299792458", "6.02214076e23", etc. There must be digits either before or after any decimal point.
Fails on syntax errors or if the conversion would yield a value outside the NUMERIC range. If the argument has more than kFracPrec
digits after the decimal point it will be rounded, with halfway cases rounding away from zero.
Definition at line 245 of file numeric.cc.
StatusOr<Numeric> google::cloud::spanner::v1::MakeNumeric | ( | T | i, |
int | exponent = 0 |
||
) |
|
inline |
Create a read-only transaction configured with opts
.
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction. Definition at line 180 of file transaction.h.
|
inline |
Create a read-write transaction configured with opts
, and sharing lock priority with txn
.
This should be used when rerunning an aborted transaction, so that the new attempt has a slightly better chance of success.
Definition at line 201 of file transaction.h.
|
inline |
Create a read-write transaction configured with opts
.
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction. Definition at line 190 of file transaction.h.
Mutation google::cloud::spanner::v1::MakeReplaceMutation | ( | std::string | table_name, |
std::vector< std::string > | columns, | ||
Ts &&... | values | ||
) |
Creates a simple "replace" mutation for the values in values
.
Definition at line 336 of file mutations.h.
Creates a Row
with the specified column names and values.
This overload accepts a vector of pairs, allowing the caller to specify both the column names and the Value
that goes in each column.
This function is intended for application developers who are mocking the results of a Client::ExecuteQuery
call.
Row google::cloud::spanner::v1::MakeTestRow | ( | Ts &&... | ts | ) |
Creates a Row
with Value
s created from the given arguments and with auto-generated column names.
This overload accepts a variadic list of arguments that will be used to create the Value
s in the row. The column names will be implicitly generated, the first column being "0", the second "1", and so on, corresponding to the argument's position.
This function is intended for application developers who are mocking the results of a Client::ExecuteQuery
call.
StatusOr< Timestamp > google::cloud::spanner::v1::MakeTimestamp | ( | absl::Time | t | ) |
Construct a Timestamp
from an absl::Time
.
May produce out-of-range errors if the given time is beyond the range supported by Timestamp
(see class comments above).
Definition at line 67 of file timestamp.cc.
StatusOr< Timestamp > google::cloud::spanner::v1::MakeTimestamp | ( | protobuf::Timestamp const & | proto | ) |
Construct a Timestamp
from a google::protobuf::Timestamp
.
May produce out-of-range errors if the given protobuf is beyond the range supported by Timestamp
(which a valid protobuf never will).
Definition at line 78 of file timestamp.cc.
StatusOr<Timestamp> google::cloud::spanner::v1::MakeTimestamp | ( | sys_time< Duration > const & | tp | ) |
Construct a Timestamp
from a std::chrono::time_point
on the system clock.
May produce out-of-range errors, depending on the properties of Duration
and the std::chrono::system_clock
epoch. Duration::rep
may not be wider than std::int64_t
. Requires that Duration::period
is no more precise than std::nano
.
Definition at line 179 of file timestamp.h.
Mutation google::cloud::spanner::v1::MakeUpdateMutation | ( | std::string | table_name, |
std::vector< std::string > | columns, | ||
Ts &&... | values | ||
) |
Creates a simple update mutation for the values in values
.
Definition at line 264 of file mutations.h.
Definition at line 40 of file database.cc.
Definition at line 38 of file instance.cc.
|
inline |
Definition at line 62 of file partition_options.h.
|
inline |
Definition at line 61 of file read_options.h.
bool google::cloud::spanner::v1::operator!= | ( | ReadPartition const & | lhs, |
ReadPartition const & | rhs | ||
) |
Definition at line 96 of file read_partition.cc.
bool google::cloud::spanner::v1::operator!= | ( | RowStreamIterator const & | a, |
RowStreamIterator const & | b | ||
) |
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
Backup const & | bu | ||
) |
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
Bytes const & | bytes | ||
) |
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
Database const & | db | ||
) |
Definition at line 42 of file database.cc.
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
Instance const & | in | ||
) |
Definition at line 40 of file instance.cc.
|
inline |
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
SqlStatement const & | stmt | ||
) |
Definition at line 60 of file sql_statement.cc.
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
Timestamp | ts | ||
) |
Definition at line 83 of file timestamp.cc.
std::ostream& google::cloud::spanner::v1::operator<< | ( | std::ostream & | os, |
Value const & | v | ||
) |
Definition at line 36 of file database.cc.
Definition at line 34 of file instance.cc.
Definition at line 24 of file mutations.cc.
|
inline |
Definition at line 57 of file partition_options.h.
bool google::cloud::spanner::v1::operator== | ( | QueryPartition const & | a, |
QueryPartition const & | b | ||
) |
Definition at line 34 of file query_partition.cc.
|
inline |
Definition at line 55 of file read_options.h.
bool google::cloud::spanner::v1::operator== | ( | ReadPartition const & | lhs, |
ReadPartition const & | rhs | ||
) |
Definition at line 91 of file read_partition.cc.
bool google::cloud::spanner::v1::operator== | ( | RowStreamIterator const & | a, |
RowStreamIterator const & | b | ||
) |
void google::cloud::spanner::v1::PrintTo | ( | Mutation const & | m, |
std::ostream * | os | ||
) |
Definition at line 29 of file mutations.cc.
StatusOr< std::string > google::cloud::spanner::v1::SerializeQueryPartition | ( | QueryPartition const & | query_partition | ) |
Serializes an instance of QueryPartition
to a string of bytes.
The serialized string of bytes is suitable for writing to disk or transmission to another process.
query_partition | - instance to be serialized. |
Definition at line 42 of file query_partition.cc.
StatusOr< std::string > google::cloud::spanner::v1::SerializeReadPartition | ( | ReadPartition const & | read_partition | ) |
Serializes an instance of ReadPartition
to a string of bytes.
The serialized string of bytes is suitable for writing to disk or transmission to another process.
read_partition | - instance to be serialized. |
Definition at line 100 of file read_partition.cc.
TupleStream<Tuple> google::cloud::spanner::v1::StreamOf | ( | RowRange && | range | ) |
A factory that creates a TupleStream<Tuple>
by wrapping the given range
.
The RowRange
must be a range defined by RowStreamIterator
objects.
range
is not transferred, so it must outlive the returned TupleStream
.RowRange | must be a range defined by RowStreamIterator s. |
|
inline |
StatusOr< T > google::cloud::spanner::v1::ToInteger | ( | Numeric const & | n, |
int | exponent = 0 |
||
) |
Conversion to the nearest integer value, scaled by 10^exponent
.
Rounds halfway cases away from zero. Fails when the destination type cannot hold that value.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
std::string google::cloud::spanner::v1::VersionString | ( | ) |
The version as a string, in MAJOR.MINOR.PATCH+gitrev format.
Definition at line 23 of file version.cc.