Class CommitOptions (2.19.0)

Set options on calls to spanner::Client::Commit().

Example
  auto commit = client.Commit(
      spanner::Mutations{
          spanner::UpdateMutationBuilder(
              "Albums", {"SingerId", "AlbumId", "MarketingBudget"})
              .EmplaceRow(1, 1, 200000)
              .EmplaceRow(2, 2, 400000)
              .Build()},
      google::cloud::Options{}.set<spanner::CommitReturnStatsOption>(true));

Constructors

CommitOptions()

Default options: no stats.

CommitOptions(Options const &)

Constructs from the new, recommended way to represent options of all varieties, google::cloud::Options.

Parameter
NameDescription
opts Options const &

Operators

operator Options() const

Converts to the new, recommended way to represent options of all varieties, google::cloud::Options.

Functions

set_return_stats(bool)

Set whether the CommitResult should contain CommitStats.

Parameter
NameDescription
return_stats bool
Returns
TypeDescription
CommitOptions &

return_stats() const

Whether the CommitResult should contain CommitStats.

Returns
TypeDescription
bool

set_request_priority(absl::optional< RequestPriority >)

Set the priority of the spanner::Client::Commit() call.

Parameter
NameDescription
request_priority absl::optional< RequestPriority >
Returns
TypeDescription
CommitOptions &

request_priority() const

The priority of the spanner::Client::Commit() call.

Returns
TypeDescription
absl::optional< RequestPriority >

set_transaction_tag(absl::optional< std::string >)

Set the transaction tag for the spanner::Client::Commit() call.

Ignored for the overload that already takes a spanner::Transaction.

Parameter
NameDescription
transaction_tag absl::optional< std::string >
Returns
TypeDescription
CommitOptions &

transaction_tag() const

The transaction tag for the spanner::Client::Commit() call.

Returns
TypeDescription
absl::optional< std::string > const &