forked from googleapis/google-cloud-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(spanner): convert QueryOptions to Options in main client API
Add an `Options opts = {}` argument to `ExecuteQuery()`, `ProfileQuery()`, `ExecuteDml()`, `ProfileDml()`, `AnalyzeSql()`, and `ExecutePartitionedDml()`, and relegate their `QueryOptions` overloads to the "backwards compatibility" section. The new `Options` overloads also begin an `OptionsSpan`. Add `operator QueryOptions::Options()` to facilitate those compatibility interfaces, and add a round-trip test against `QueryOptions(Options const&)`. Then use that to implement `operator ClientOptions::Options()` to eliminate some duplication (and `client_options.cc`). Move the `SPANNER_OPTIMIZER_VERSION`/`SPANNER_OPTIMIZER_STATISTICS_PACKAGE` handling into `spanner:: DefaultOptions()`, which means that all of the `OverlayQueryOptions()` machinery can go away. "Overlay" priorities are now handled by the normal `Options`-merging process. Update the samples to use the preferred `Options` overloads. Part of googleapis#7690. Aside: The existing doxygen groupings do not appear to do what we want here, but let's continue with them for now, and fix them en masse later.
- Loading branch information
Showing
12 changed files
with
266 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.