Class CommitOptions (2.15.1)

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
Name Description
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
Name Description
return_stats bool
Returns
Type Description
CommitOptions &

return_stats() const

Whether the CommitResult should contain CommitStats.

Returns
Type Description
bool

set_request_priority(absl::optional< RequestPriority >)

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

Parameter
Name Description
request_priority absl::optional< RequestPriority >
Returns
Type Description
CommitOptions &

request_priority() const

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

Returns
Type Description
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
Name Description
transaction_tag absl::optional< std::string >
Returns
Type Description
CommitOptions &

transaction_tag() const

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

Returns
Type Description
absl::optional< std::string > const &