You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 04cfe81
Browse filesBrowse the repository at this point in the historyBrowse files
authored
chore: add RequestOptions proto; add optimizer_statistics_package to QueryOptions (#288)
* changes without context
autosynth cannot find the source of changes triggered by earlier changes in this
repository, or by version upgrades to tools such as linters.
* chore: update gapic-generator-python to 0.40.11
PiperOrigin-RevId: 359562873
Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Feb 25 10:52:32 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 07932bb995e7dc91b43620ea8402c6668c7d102c
Source-Link: googleapis/googleapis@07932bb
* feat(spanner): add `optimizer_statistics_package` field in `QueryOptions`
PiperOrigin-RevId: 360758638
Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Mar 3 14:32:33 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: dff6e4625d4ea0a16fc44d3b9be115219c403f07
Source-Link: googleapis/googleapis@dff6e46
* chore: upgrade gapic-generator-python to 0.42.2
PiperOrigin-RevId: 361662015
Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Mar 8 14:47:18 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 28a591963253d52ce3a25a918cafbdd9928de8cf
Source-Link: googleapis/googleapis@28a5919
* chore: upgrade gapic-generator-python to 0.43.1
PiperOrigin-RevId: 364411656
Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Mar 22 14:40:22 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 149a3a84c29c9b8189576c7442ccb6dcf6a8f95b
Source-Link: googleapis/googleapis@149a3a8
* feat: add RPC Priority request options
PiperOrigin-RevId: 364449524
Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Mar 22 17:39:37 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 6598bb829c9e9a534be674649ffd1b4671a821f9
Source-Link: googleapis/googleapis@6598bb8
* feat: add tagging request options
PiperOrigin-RevId: 365498709
Source-Author: Google APIs <noreply@google.com>
Source-Date: Sun Mar 28 20:54:25 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 6ce40ff8faf68226782f507ca6b2d497a77044de
Source-Link: googleapis/googleapis@6ce40ff
* fix: fix dependencies
* chore: revert changes taht break tests
* style: fix lint
Co-authored-by: Bu Sun Kim <busunkim@google.com>
Co-authored-by: larkee <larkee@users.noreply.github.com>
* The scripts `fixup_spanner_v1_keywords.py`, `fixup_spanner_admin_database_v1_keywords.py`, and
186
-
`fixup_spanner_admin_instance_v1_keywords.py` are shipped with the library. They expect an input directory (with the
186
+
`fixup_spanner_admin_instance_v1_keywords.py` are shipped with the library. They expect an input directory (with the
187
187
code to convert) and an empty destination directory.
188
188
189
189
```sh
@@ -194,10 +194,10 @@ $ fixup_spanner_v1_keywords.py --input-directory .samples/ --output-directory sa
194
194
>the handwritten surfaces e.g. `client.list_instances()`
195
195
196
196
#### More details
197
-
197
+
198
198
In `google-cloud-spanner<2.0.0`, parameters required by the API were positional parameters and optional parameters were
199
199
keyword parameters.
200
-
200
+
201
201
**Before:**
202
202
```py
203
203
deflist_instances(
@@ -210,14 +210,14 @@ def list_instances(
210
210
metadata=None,
211
211
):
212
212
```
213
-
214
-
In the 2.0.0 release, all methods have a single positional parameter `request`. Method docstrings indicate whether a
213
+
214
+
In the 2.0.0 release, all methods have a single positional parameter `request`. Method docstrings indicate whether a
215
215
parameter is required or optional.
216
-
217
-
Some methods have additional keyword only parameters. The available parameters depend on the
216
+
217
+
Some methods have additional keyword only parameters. The available parameters depend on the
218
218
[`google.api.method_signature` annotation](https://github.com/googleapis/googleapis/blob/master/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L86) specified by the API producer.
219
-
220
-
219
+
220
+
221
221
**After:**
222
222
```py
223
223
deflist_instances(
@@ -230,30 +230,30 @@ def list_instances(
230
230
metadata: Sequence[Tuple[str, str]] = (),
231
231
) -> pagers.ListInstancesPager:
232
232
```
233
-
233
+
234
234
> **NOTE:** The `request` parameter and flattened keyword parameters for the API are mutually exclusive.
235
235
> Passing both will result in an error.
236
-
237
-
236
+
237
+
238
238
Both of these calls are valid:
239
-
239
+
240
240
```py
241
241
response = client.list_instances(
242
242
request={
243
243
"parent": project_name,
244
244
}
245
245
)
246
246
```
247
-
247
+
248
248
```py
249
249
response = client.execute_sql(
250
250
parent=project_name,
251
251
)
252
252
```
253
-
253
+
254
254
This call is invalid because it mixes `request` with a keyword argument `parent`. Executing this code
Copy file name to clipboardExpand all lines: packages/google-cloud-spanner/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py
+42-2Lines changed: 42 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -103,8 +103,36 @@ class DatabaseAdminAsyncClient:
0 commit comments