15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_COMMIT_OPTIONS_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_COMMIT_OPTIONS_H
18#include "google/cloud/spanner/request_priority.h"
19#include "google/cloud/spanner/version.h"
20#include "google/cloud/options.h"
21#include "absl/types/optional.h"
27GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
30
31
32
33
34
41
42
43
47
48
49
54 return_stats_ = return_stats;
64 request_priority_ = std::move(request_priority);
70 return request_priority_;
74
75
76
78 absl::optional<std::string> transaction_tag) {
79 transaction_tag_ = std::move(transaction_tag);
85 return transaction_tag_;
91 bool return_stats_ =
false;
93 absl::optional<std::string> transaction_tag_;
96GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Set options on calls to spanner::Client::Commit().
Definition: commit_options.h:35
CommitOptions & set_return_stats(bool return_stats)
Set whether the CommitResult should contain CommitStats.
Definition: commit_options.h:53
CommitOptions & set_transaction_tag(absl::optional< std::string > transaction_tag)
Set the transaction tag for the spanner::Client::Commit() call.
Definition: commit_options.h:77
operator Options() const
Converts to the new, recommended way to represent options of all varieties, google::cloud::Options.
CommitOptions()=default
Default options: no stats.
bool return_stats() const
Whether the CommitResult should contain CommitStats.
Definition: commit_options.h:59
CommitOptions(Options const &opts)
Constructs from the new, recommended way to represent options of all varieties, google::cloud::Option...
absl::optional< RequestPriority > request_priority() const
The priority of the spanner::Client::Commit() call.
Definition: commit_options.h:69
absl::optional< std::string > const & transaction_tag() const
The transaction tag for the spanner::Client::Commit() call.
Definition: commit_options.h:84
CommitOptions & set_request_priority(absl::optional< RequestPriority > request_priority)
Set the priority of the spanner::Client::Commit() call.
Definition: commit_options.h:62
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
RequestPriority
Definition: request_priority.h:26