Skip to content

Commit db011bd

Browse files
committed
run check-api-pr;add doc
1 parent 8f4fdbf commit db011bd

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
-456 Bytes
Binary file not shown.

doc/v3-migration-guide.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,45 @@ auto limit = google::cloud::bigtable::RowReader::NO_ROWS_LIMIT;
125125

126126
### Spanner
127127

128+
<details>
129+
<summary>Removed <code>spanner::ClientOptions</code> class</summary>
130+
131+
The `spanner::ClientOptions` class has been removed. Use `google::cloud::Options`
132+
instead to set the following as needed:
133+
134+
* `spanner::QueryOptimizerVersionOption`
135+
* `spanner::QueryOptimizerStatisticsPackageOption`
136+
* `spanner::RequestPriorityOption`
137+
* `spanner::RequestTagOption`
138+
139+
**Before:**
140+
141+
```cpp
142+
#include "google/cloud/spanner/client.h"
143+
144+
// ...
145+
146+
namespace spanner = ::google::cloud::spanner;
147+
auto client_options = spanner::ClientOptions().set_query_options(
148+
spanner::QueryOptions().set_optimizer_version("1"));
149+
150+
auto client = spanner::Client(connection, client_options);
151+
```
152+
153+
**After:**
154+
155+
```cpp
156+
#include "google/cloud/spanner/client.h"
157+
#include "google/cloud/spanner/options.h"
158+
159+
// ...
160+
161+
namespace spanner = ::google::cloud::spanner;
162+
auto options = google::cloud::Options{}.set<spanner::QueryOptimizerVersionOption>("1");
163+
164+
auto client = spanner::Client(connection, options);
165+
```
166+
167+
</details>
168+
128169
### Storage

0 commit comments

Comments
 (0)