Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions google/cloud/spanner/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ RowStream Client::ExecuteQuery(SqlStatement statement) {
return conn_->ExecuteQuery(
{internal::MakeSingleUseTransaction(Transaction::ReadOnlyOptions()),
std::move(statement),
{},
{}});
}

Expand All @@ -94,13 +95,14 @@ RowStream Client::ExecuteQuery(
return conn_->ExecuteQuery(
{internal::MakeSingleUseTransaction(std::move(transaction_options)),
std::move(statement),
{},
{}});
}

RowStream Client::ExecuteQuery(Transaction transaction,
SqlStatement statement) {
return conn_->ExecuteQuery(
{std::move(transaction), std::move(statement), {}});
{std::move(transaction), std::move(statement), {}, {}});
}

RowStream Client::ExecuteQuery(QueryPartition const& partition) {
Expand All @@ -111,6 +113,7 @@ ProfileQueryResult Client::ProfileQuery(SqlStatement statement) {
return conn_->ProfileQuery(
{internal::MakeSingleUseTransaction(Transaction::ReadOnlyOptions()),
std::move(statement),
{},
{}});
}

Expand All @@ -119,13 +122,14 @@ ProfileQueryResult Client::ProfileQuery(
return conn_->ProfileQuery(
{internal::MakeSingleUseTransaction(std::move(transaction_options)),
std::move(statement),
{},
{}});
}

ProfileQueryResult Client::ProfileQuery(Transaction transaction,
SqlStatement statement) {
return conn_->ProfileQuery(
{std::move(transaction), std::move(statement), {}});
{std::move(transaction), std::move(statement), {}, {}});
}

StatusOr<std::vector<QueryPartition>> Client::PartitionQuery(
Expand All @@ -137,17 +141,20 @@ StatusOr<std::vector<QueryPartition>> Client::PartitionQuery(

StatusOr<DmlResult> Client::ExecuteDml(Transaction transaction,
SqlStatement statement) {
return conn_->ExecuteDml({std::move(transaction), std::move(statement), {}});
return conn_->ExecuteDml(
{std::move(transaction), std::move(statement), {}, {}});
}

StatusOr<ProfileDmlResult> Client::ProfileDml(Transaction transaction,
SqlStatement statement) {
return conn_->ProfileDml({std::move(transaction), std::move(statement), {}});
return conn_->ProfileDml(
{std::move(transaction), std::move(statement), {}, {}});
}

StatusOr<ExecutionPlan> Client::AnalyzeSql(Transaction transaction,
SqlStatement statement) {
return conn_->AnalyzeSql({std::move(transaction), std::move(statement), {}});
return conn_->AnalyzeSql(
{std::move(transaction), std::move(statement), {}, {}});
}

StatusOr<BatchDmlResult> Client::ExecuteBatchDml(
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/spanner/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class Connection {
struct SqlParams {
Transaction transaction;
SqlStatement statement;
struct {
} placeholder_do_not_use_name_will_change;
google::cloud::optional<std::string> partition_token;
};

Expand Down
4 changes: 3 additions & 1 deletion google/cloud/spanner/query_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ QueryPartition MakeQueryPartition(std::string const& transaction_id,
Connection::SqlParams MakeSqlParams(QueryPartition const& query_partition) {
return {internal::MakeTransactionFromIds(query_partition.session_id(),
query_partition.transaction_id()),
query_partition.sql_statement(), query_partition.partition_token()};
query_partition.sql_statement(),
{},
query_partition.partition_token()};
}

} // namespace internal
Expand Down