From 3e4c2fb99488bccab3e89ff203652c3453357a67 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 21 Apr 2020 06:29:01 -0700 Subject: [PATCH 1/2] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .coveragerc | 16 + .flake8 | 16 + .github/ISSUE_TEMPLATE/bug_report.md | 3 +- CONTRIBUTING.rst | 15 +- MANIFEST.in | 16 + docs/conf.py | 1 - .../gapic/database_admin_client_config.py | 6 +- .../proto/backup.proto | 4 +- .../proto/backup_pb2.py | 105 ++-- .../proto/common_pb2.py | 2 - .../proto/spanner_database_admin_pb2.py | 120 ++--- .../proto/spanner_instance_admin_pb2.py | 79 +-- google/cloud/spanner_v1/proto/keys_pb2.py | 166 ++---- google/cloud/spanner_v1/proto/mutation_pb2.py | 19 +- .../cloud/spanner_v1/proto/query_plan_pb2.py | 15 +- .../cloud/spanner_v1/proto/result_set_pb2.py | 23 +- google/cloud/spanner_v1/proto/spanner_pb2.py | 115 +---- .../cloud/spanner_v1/proto/transaction_pb2.py | 473 +++++++----------- google/cloud/spanner_v1/proto/type_pb2.py | 10 +- setup.cfg | 16 + synth.metadata | 19 +- 21 files changed, 470 insertions(+), 769 deletions(-) diff --git a/.coveragerc b/.coveragerc index b178b094aa..dd39c8546c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [run] branch = True diff --git a/.flake8 b/.flake8 index 0268ecc9c5..20fe9bda2e 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [flake8] ignore = E203, E266, E501, W503 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 96d9781dc8..2a0c359a3f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,8 +11,7 @@ Thanks for stopping by to let us know something could be better! Please run down the following list and make sure you've tried the usual "quick fixes": - Search the issues already opened: https://github.com/googleapis/python-spanner/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-python - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+python + - Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python If you are still having issues, please be sure to include as much information as possible: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e9fa887ebf..e3b0e9d158 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: 2.7, - 3.5, 3.6, and 3.7 on both UNIX and Windows. + 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -214,26 +214,18 @@ We support: - `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ +- `Python 3.8`_ .. _Python 3.5: https://docs.python.org/3.5/ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ +.. _Python 3.8: https://docs.python.org/3.8/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-spanner/blob/master/noxfile.py -We explicitly decided not to support `Python 2.5`_ due to `decreased usage`_ -and lack of continuous integration `support`_. - -.. _Python 2.5: https://docs.python.org/2.5/ -.. _decreased usage: https://caremad.io/2013/10/a-look-at-pypi-downloads/ -.. _support: https://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/ - -We have `dropped 2.6`_ as a supported version as well since Python 2.6 is no -longer supported by the core development team. - Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. We also explicitly decided to support Python 3 beginning with version @@ -247,7 +239,6 @@ We also explicitly decided to support Python 3 beginning with version .. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django .. _projects: http://flask.pocoo.org/docs/0.10/python3/ .. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ -.. _dropped 2.6: https://github.com/googleapis/google-cloud-python/issues/995 ********** Versioning diff --git a/MANIFEST.in b/MANIFEST.in index d96120f55e..b36e3621b0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! include README.rst LICENSE include google/cloud/spanner_v1/gapic/transports/spanner.grpc.config diff --git a/docs/conf.py b/docs/conf.py index 4fffc063c8..e326daef4e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,7 +38,6 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", - "recommonmark", ] # autodoc/autosummary flags diff --git a/google/cloud/spanner_admin_database_v1/gapic/database_admin_client_config.py b/google/cloud/spanner_admin_database_v1/gapic/database_admin_client_config.py index d6f830eeee..c82216409b 100644 --- a/google/cloud/spanner_admin_database_v1/gapic/database_admin_client_config.py +++ b/google/cloud/spanner_admin_database_v1/gapic/database_admin_client_config.py @@ -58,7 +58,7 @@ "retry_params_name": "default", }, "CreateBackup": { - "timeout_millis": 30000, + "timeout_millis": 3600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, @@ -73,7 +73,7 @@ "retry_params_name": "default", }, "DeleteBackup": { - "timeout_millis": 30000, + "timeout_millis": 3600000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, @@ -83,7 +83,7 @@ "retry_params_name": "default", }, "RestoreDatabase": { - "timeout_millis": 30000, + "timeout_millis": 3600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/spanner_admin_database_v1/proto/backup.proto b/google/cloud/spanner_admin_database_v1/proto/backup.proto index d9b6fd74cd..b883adf34c 100644 --- a/google/cloud/spanner_admin_database_v1/proto/backup.proto +++ b/google/cloud/spanner_admin_database_v1/proto/backup.proto @@ -56,7 +56,9 @@ message Backup { // created. This needs to be in the same instance as the backup. // Values are of the form // `projects//instances//databases/`. - string database = 2; + string database = 2 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + }]; // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] // operation. The expiration time of the backup, with microseconds diff --git a/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py b/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py index edc596bd94..6295d29898 100644 --- a/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py +++ b/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py @@ -36,7 +36,7 @@ "\n$com.google.spanner.admin.database.v1B\013BackupProtoP\001ZHgoogle.golang.org/genproto/googleapis/spanner/admin/database/v1;database\252\002&Google.Cloud.Spanner.Admin.Database.V1\312\002&Google\\Cloud\\Spanner\\Admin\\Database\\V1" ), serialized_pb=_b( - '\n9google/cloud/spanner/admin/database_v1/proto/backup.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x39google/cloud/spanner/admin/database_v1/proto/common.proto\x1a\x1cgoogle/api/annotations.proto"\xa7\x03\n\x06\x42\x61\x63kup\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x06 \x01(\x0e\x32..google.spanner.admin.database.v1.Backup.StateB\x03\xe0\x41\x03\x12"\n\x15referencing_databases\x18\x07 \x03(\tB\x03\xe0\x41\x03"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:\\\xea\x41Y\n\x1dspanner.googleapis.com/Backup\x12\x38projects/{project}/instances/{instance}/backups/{backup}"\xa5\x01\n\x13\x43reateBackupRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x62\x61\x63kup\x18\x03 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02"\xae\x01\n\x14\x43reateBackupMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x45\n\x08progress\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.database.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8a\x01\n\x13UpdateBackupRequest\x12=\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"G\n\x10GetBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup"J\n\x13\x44\x65leteBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup"\x84\x01\n\x12ListBackupsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"i\n\x13ListBackupsResponse\x12\x39\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32(.google.spanner.admin.database.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8d\x01\n\x1bListBackupOperationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"j\n\x1cListBackupOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"f\n\nBackupInfo\x12\x0e\n\x06\x62\x61\x63kup\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fsource_database\x18\x03 \x01(\tB\xd1\x01\n$com.google.spanner.admin.database.v1B\x0b\x42\x61\x63kupProtoP\x01ZHgoogle.golang.org/genproto/googleapis/spanner/admin/database/v1;database\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1b\x06proto3' + '\n9google/cloud/spanner/admin/database_v1/proto/backup.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x39google/cloud/spanner/admin/database_v1/proto/common.proto\x1a\x1cgoogle/api/annotations.proto"\xcd\x03\n\x06\x42\x61\x63kup\x12\x36\n\x08\x64\x61tabase\x18\x02 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x06 \x01(\x0e\x32..google.spanner.admin.database.v1.Backup.StateB\x03\xe0\x41\x03\x12"\n\x15referencing_databases\x18\x07 \x03(\tB\x03\xe0\x41\x03"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:\\\xea\x41Y\n\x1dspanner.googleapis.com/Backup\x12\x38projects/{project}/instances/{instance}/backups/{backup}"\xa5\x01\n\x13\x43reateBackupRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x62\x61\x63kup\x18\x03 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02"\xae\x01\n\x14\x43reateBackupMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x45\n\x08progress\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.database.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8a\x01\n\x13UpdateBackupRequest\x12=\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"G\n\x10GetBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup"J\n\x13\x44\x65leteBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup"\x84\x01\n\x12ListBackupsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"i\n\x13ListBackupsResponse\x12\x39\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32(.google.spanner.admin.database.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8d\x01\n\x1bListBackupOperationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"j\n\x1cListBackupOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"f\n\nBackupInfo\x12\x0e\n\x06\x62\x61\x63kup\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fsource_database\x18\x03 \x01(\tB\xd1\x01\n$com.google.spanner.admin.database.v1B\x0b\x42\x61\x63kupProtoP\x01ZHgoogle.golang.org/genproto/googleapis/spanner/admin/database/v1;database\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1b\x06proto3' ), dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -72,8 +72,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=623, - serialized_end=678, + serialized_start=661, + serialized_end=716, ) _sym_db.RegisterEnumDescriptor(_BACKUP_STATE) @@ -100,7 +100,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\372A!\n\037spanner.googleapis.com/Database"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -223,7 +223,7 @@ extension_ranges=[], oneofs=[], serialized_start=349, - serialized_end=772, + serialized_end=810, ) @@ -299,8 +299,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=775, - serialized_end=940, + serialized_start=813, + serialized_end=978, ) @@ -392,8 +392,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=943, - serialized_end=1117, + serialized_start=981, + serialized_end=1155, ) @@ -449,8 +449,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1120, - serialized_end=1258, + serialized_start=1158, + serialized_end=1296, ) @@ -490,8 +490,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1260, - serialized_end=1331, + serialized_start=1298, + serialized_end=1369, ) @@ -531,8 +531,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1333, - serialized_end=1407, + serialized_start=1371, + serialized_end=1445, ) @@ -626,8 +626,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1410, - serialized_end=1542, + serialized_start=1448, + serialized_end=1580, ) @@ -683,8 +683,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1544, - serialized_end=1649, + serialized_start=1582, + serialized_end=1687, ) @@ -778,8 +778,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1652, - serialized_end=1793, + serialized_start=1690, + serialized_end=1831, ) @@ -835,8 +835,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1795, - serialized_end=1901, + serialized_start=1833, + serialized_end=1939, ) @@ -910,8 +910,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1903, - serialized_end=2005, + serialized_start=1941, + serialized_end=2043, ) _BACKUP.fields_by_name[ @@ -966,8 +966,6 @@ DESCRIPTOR=_BACKUP, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", __doc__="""A backup of a Cloud Spanner database. - - Attributes: database: Required for the [CreateBackup][google.spanner.admin.database. @@ -1026,10 +1024,8 @@ dict( DESCRIPTOR=_CREATEBACKUPREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for - [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. - - + __doc__="""The request for [CreateBackup][google.spanner.admin.database.v1.Databa + seAdmin.CreateBackup]. Attributes: parent: Required. The name of the instance in which the backup will be @@ -1057,10 +1053,8 @@ dict( DESCRIPTOR=_CREATEBACKUPMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""Metadata type for the operation returned by - [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. - - + __doc__="""Metadata type for the operation returned by [CreateBackup][google.span + ner.admin.database.v1.DatabaseAdmin.CreateBackup]. Attributes: name: The name of the backup being created. @@ -1095,10 +1089,8 @@ dict( DESCRIPTOR=_UPDATEBACKUPREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for - [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. - - + __doc__="""The request for [UpdateBackup][google.spanner.admin.database.v1.Databa + seAdmin.UpdateBackup]. Attributes: backup: Required. The backup to update. ``backup.name``, and the @@ -1126,8 +1118,6 @@ __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", __doc__="""The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup]. - - Attributes: name: Required. Name of the backup. Values are of the form @@ -1144,10 +1134,8 @@ dict( DESCRIPTOR=_DELETEBACKUPREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for - [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup]. - - + __doc__="""The request for [DeleteBackup][google.spanner.admin.database.v1.Databa + seAdmin.DeleteBackup]. Attributes: name: Required. Name of the backup to delete. Values are of the form @@ -1164,10 +1152,8 @@ dict( DESCRIPTOR=_LISTBACKUPSREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for - [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. - - + __doc__="""The request for [ListBackups][google.spanner.admin.database.v1.Databas + eAdmin.ListBackups]. Attributes: parent: Required. The instance to list backups from. Values are of the @@ -1221,10 +1207,8 @@ dict( DESCRIPTOR=_LISTBACKUPSRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The response for - [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. - - + __doc__="""The response for [ListBackups][google.spanner.admin.database.v1.Databa + seAdmin.ListBackups]. Attributes: backups: The list of matching backups. Backups returned are ordered by @@ -1246,10 +1230,8 @@ dict( DESCRIPTOR=_LISTBACKUPOPERATIONSREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for - [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. - - + __doc__="""The request for [ListBackupOperations][google.spanner.admin.database.v + 1.DatabaseAdmin.ListBackupOperations]. Attributes: parent: Required. The instance of the backup operations. Values are of @@ -1310,10 +1292,8 @@ dict( DESCRIPTOR=_LISTBACKUPOPERATIONSRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The response for - [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. - - + __doc__="""The response for [ListBackupOperations][google.spanner.admin.database. + v1.DatabaseAdmin.ListBackupOperations]. Attributes: operations: The list of matching backup [long-running @@ -1343,8 +1323,6 @@ DESCRIPTOR=_BACKUPINFO, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", __doc__="""Information about a backup. - - Attributes: backup: Name of the backup. @@ -1362,6 +1340,7 @@ DESCRIPTOR._options = None +_BACKUP.fields_by_name["database"]._options = None _BACKUP.fields_by_name["create_time"]._options = None _BACKUP.fields_by_name["size_bytes"]._options = None _BACKUP.fields_by_name["state"]._options = None diff --git a/google/cloud/spanner_admin_database_v1/proto/common_pb2.py b/google/cloud/spanner_admin_database_v1/proto/common_pb2.py index 3acf791486..33e03762cf 100644 --- a/google/cloud/spanner_admin_database_v1/proto/common_pb2.py +++ b/google/cloud/spanner_admin_database_v1/proto/common_pb2.py @@ -129,8 +129,6 @@ __module__="google.cloud.spanner.admin.database_v1.proto.common_pb2", __doc__="""Encapsulates progress related information for a Cloud Spanner long running operation. - - Attributes: progress_percent: Percent completion of the operation. Values are between 0 and diff --git a/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py b/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py index 125ab3f86b..922dad5441 100644 --- a/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py +++ b/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py @@ -1369,8 +1369,6 @@ DESCRIPTOR=_RESTOREINFO, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", __doc__="""Information about the database restore. - - Attributes: source_type: The type of the restore source. @@ -1392,8 +1390,6 @@ DESCRIPTOR=_DATABASE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", __doc__="""A Cloud Spanner database. - - Attributes: name: Required. The name of the database. Values are of the form ``p @@ -1421,10 +1417,8 @@ dict( DESCRIPTOR=_LISTDATABASESREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. - - + __doc__="""The request for [ListDatabases][google.spanner.admin.database.v1.Datab + aseAdmin.ListDatabases]. Attributes: parent: Required. The instance whose databases should be listed. @@ -1450,10 +1444,8 @@ dict( DESCRIPTOR=_LISTDATABASESRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The response for - [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. - - + __doc__="""The response for [ListDatabases][google.spanner.admin.database.v1.Data + baseAdmin.ListDatabases]. Attributes: databases: Databases that matched the request. @@ -1473,10 +1465,8 @@ dict( DESCRIPTOR=_CREATEDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. - - + __doc__="""The request for [CreateDatabase][google.spanner.admin.database.v1.Data + baseAdmin.CreateDatabase]. Attributes: parent: Required. The name of the instance that will serve the new @@ -1507,10 +1497,8 @@ dict( DESCRIPTOR=_CREATEDATABASEMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the operation returned by - [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. - - + __doc__="""Metadata type for the operation returned by [CreateDatabase][google.sp + anner.admin.database.v1.DatabaseAdmin.CreateDatabase]. Attributes: database: The database being created. @@ -1526,10 +1514,8 @@ dict( DESCRIPTOR=_GETDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. - - + __doc__="""The request for [GetDatabase][google.spanner.admin.database.v1.Databas + eAdmin.GetDatabase]. Attributes: name: Required. The name of the requested database. Values are of @@ -1547,24 +1533,20 @@ dict( DESCRIPTOR=_UPDATEDATABASEDDLREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Enqueues the given DDL statements to be applied, in order - but not necessarily all at once, to the database schema at some point - (or points) in the future. The server checks that the statements are + __doc__="""Enqueues the given DDL statements to be applied, in order but not + necessarily all at once, to the database schema at some point (or + points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before - enqueueing them, but they may still fail upon later execution (e.g., if - a statement from another batch of statements is applied first and it - conflicts in some way, or if there is some data-related problem like a - ``NULL`` value in a column to which ``NOT NULL`` would be added). If a - statement fails, all subsequent statements in the batch are - automatically cancelled. - - Each batch of statements is assigned a name which can be used with the - [Operations][google.longrunning.Operations] API to monitor progress. See - the - [operation\_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation\_id] - field for more details. - - + enqueueing them, but they may still fail upon later execution (e.g., + if a statement from another batch of statements is applied first and + it conflicts in some way, or if there is some data-related problem + like a ``NULL`` value in a column to which ``NOT NULL`` would be + added). If a statement fails, all subsequent statements in the batch + are automatically cancelled. Each batch of statements is assigned a + name which can be used with the + [Operations][google.longrunning.Operations] API to monitor progress. + See the [operation\_id][google.spanner.admin.database.v1.UpdateDatabas + eDdlRequest.operation\_id] field for more details. Attributes: database: Required. The database to update. @@ -1603,10 +1585,8 @@ dict( DESCRIPTOR=_UPDATEDATABASEDDLMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the operation returned by - [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. - - + __doc__="""Metadata type for the operation returned by [UpdateDatabaseDdl][google + .spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Attributes: database: The database being modified. @@ -1629,10 +1609,8 @@ dict( DESCRIPTOR=_DROPDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. - - + __doc__="""The request for [DropDatabase][google.spanner.admin.database.v1.Databa + seAdmin.DropDatabase]. Attributes: database: Required. The database to be dropped. @@ -1648,10 +1626,8 @@ dict( DESCRIPTOR=_GETDATABASEDDLREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. - - + __doc__="""The request for [GetDatabaseDdl][google.spanner.admin.database.v1.Data + baseAdmin.GetDatabaseDdl]. Attributes: database: Required. The database whose schema we wish to get. @@ -1667,10 +1643,8 @@ dict( DESCRIPTOR=_GETDATABASEDDLRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The response for - [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. - - + __doc__="""The response for [GetDatabaseDdl][google.spanner.admin.database.v1.Dat + abaseAdmin.GetDatabaseDdl]. Attributes: statements: A list of formatted DDL statements defining the schema of the @@ -1687,10 +1661,8 @@ dict( DESCRIPTOR=_LISTDATABASEOPERATIONSREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. - - + __doc__="""The request for [ListDatabaseOperations][google.spanner.admin.database + .v1.DatabaseAdmin.ListDatabaseOperations]. Attributes: parent: Required. The instance of the database operations. Values are @@ -1755,10 +1727,8 @@ dict( DESCRIPTOR=_LISTDATABASEOPERATIONSRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The response for - [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. - - + __doc__="""The response for [ListDatabaseOperations][google.spanner.admin.databas + e.v1.DatabaseAdmin.ListDatabaseOperations]. Attributes: operations: The list of matching database [long-running @@ -1783,10 +1753,8 @@ dict( DESCRIPTOR=_RESTOREDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for - [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. - - + __doc__="""The request for [RestoreDatabase][google.spanner.admin.database.v1.Dat + abaseAdmin.RestoreDatabase]. Attributes: parent: Required. The name of the instance in which to create the @@ -1818,10 +1786,8 @@ dict( DESCRIPTOR=_RESTOREDATABASEMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the long-running operation returned by - [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. - - + __doc__="""Metadata type for the long-running operation returned by [RestoreDatab + ase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. Attributes: name: Name of the database being created and restored to. @@ -1876,13 +1842,11 @@ dict( DESCRIPTOR=_OPTIMIZERESTOREDDATABASEMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the long-running operation used to track - the progress of optimizations performed on a newly restored database. - This long-running operation is automatically created by the system after + __doc__="""Metadata type for the long-running operation used to track the + progress of optimizations performed on a newly restored database. This + long-running operation is automatically created by the system after the successful completion of a database restore, and cannot be cancelled. - - Attributes: name: Name of the restored database being optimized. diff --git a/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py b/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py index f00bfbbe0a..1938a6f5c4 100644 --- a/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py +++ b/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py @@ -1304,11 +1304,8 @@ dict( DESCRIPTOR=_INSTANCECONFIG, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""A possible configuration for a Cloud Spanner instance. - Configurations define the geographic placement of nodes and their - replication. - - + __doc__="""A possible configuration for a Cloud Spanner instance. Configurations + define the geographic placement of nodes and their replication. Attributes: name: A unique identifier for the instance configuration. Values are @@ -1340,10 +1337,8 @@ ), DESCRIPTOR=_INSTANCE, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""An isolated set of Cloud Spanner resources on which - databases can be hosted. - - + __doc__="""An isolated set of Cloud Spanner resources on which databases can be + hosted. Attributes: name: Required. A unique identifier for the instance, which cannot @@ -1412,10 +1407,8 @@ dict( DESCRIPTOR=_LISTINSTANCECONFIGSREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. - - + __doc__="""The request for [ListInstanceConfigs][google.spanner.admin.instance.v1 + .InstanceAdmin.ListInstanceConfigs]. Attributes: parent: Required. The name of the project for which a list of @@ -1443,10 +1436,8 @@ dict( DESCRIPTOR=_LISTINSTANCECONFIGSRESPONSE, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The response for - [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. - - + __doc__="""The response for [ListInstanceConfigs][google.spanner.admin.instance.v + 1.InstanceAdmin.ListInstanceConfigs]. Attributes: instance_configs: The list of requested instance configurations. @@ -1467,10 +1458,8 @@ dict( DESCRIPTOR=_GETINSTANCECONFIGREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig]. - - + __doc__="""The request for [GetInstanceConfigRequest][google.spanner.admin.instan + ce.v1.InstanceAdmin.GetInstanceConfig]. Attributes: name: Required. The name of the requested instance configuration. @@ -1488,10 +1477,8 @@ dict( DESCRIPTOR=_GETINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance]. - - + __doc__="""The request for [GetInstance][google.spanner.admin.instance.v1.Instanc + eAdmin.GetInstance]. Attributes: name: Required. The name of the requested instance. Values are of @@ -1514,10 +1501,8 @@ dict( DESCRIPTOR=_CREATEINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. - - + __doc__="""The request for [CreateInstance][google.spanner.admin.instance.v1.Inst + anceAdmin.CreateInstance]. Attributes: parent: Required. The name of the project in which to create the @@ -1541,10 +1526,8 @@ dict( DESCRIPTOR=_LISTINSTANCESREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. - - + __doc__="""The request for [ListInstances][google.spanner.admin.instance.v1.Insta + nceAdmin.ListInstances]. Attributes: parent: Required. The name of the project for which a list of @@ -1584,10 +1567,8 @@ dict( DESCRIPTOR=_LISTINSTANCESRESPONSE, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The response for - [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. - - + __doc__="""The response for [ListInstances][google.spanner.admin.instance.v1.Inst + anceAdmin.ListInstances]. Attributes: instances: The list of requested instances. @@ -1607,10 +1588,8 @@ dict( DESCRIPTOR=_UPDATEINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. - - + __doc__="""The request for [UpdateInstance][google.spanner.admin.instance.v1.Inst + anceAdmin.UpdateInstance]. Attributes: instance: Required. The instance to update, which must always include @@ -1637,10 +1616,8 @@ dict( DESCRIPTOR=_DELETEINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for - [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance]. - - + __doc__="""The request for [DeleteInstance][google.spanner.admin.instance.v1.Inst + anceAdmin.DeleteInstance]. Attributes: name: Required. The name of the instance to be deleted. Values are @@ -1657,10 +1634,8 @@ dict( DESCRIPTOR=_CREATEINSTANCEMETADATA, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""Metadata type for the operation returned by - [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. - - + __doc__="""Metadata type for the operation returned by [CreateInstance][google.sp + anner.admin.instance.v1.InstanceAdmin.CreateInstance]. Attributes: instance: The instance being created. @@ -1686,10 +1661,8 @@ dict( DESCRIPTOR=_UPDATEINSTANCEMETADATA, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""Metadata type for the operation returned by - [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. - - + __doc__="""Metadata type for the operation returned by [UpdateInstance][google.sp + anner.admin.instance.v1.InstanceAdmin.UpdateInstance]. Attributes: instance: The desired end state of the update. diff --git a/google/cloud/spanner_v1/proto/keys_pb2.py b/google/cloud/spanner_v1/proto/keys_pb2.py index 9d38124847..15f4b0fad3 100644 --- a/google/cloud/spanner_v1/proto/keys_pb2.py +++ b/google/cloud/spanner_v1/proto/keys_pb2.py @@ -268,118 +268,47 @@ dict( DESCRIPTOR=_KEYRANGE, __module__="google.cloud.spanner_v1.proto.keys_pb2", - __doc__="""KeyRange represents a range of rows in a table or index. - - A range has a start key and an end key. These keys can be open or - closed, indicating if the range includes rows with that key. - - Keys are represented by lists, where the ith value in the list - corresponds to the ith component of the table or index primary key. - Individual values are encoded as described - [here][google.spanner.v1.TypeCode]. - - For example, consider the following table definition: - - :: - - CREATE TABLE UserEvents ( - UserName STRING(MAX), - EventDate STRING(10) - ) PRIMARY KEY(UserName, EventDate); - - The following keys name rows in this table: - - :: - - ["Bob", "2014-09-23"] - ["Alfred", "2015-06-12"] - - Since the ``UserEvents`` table's ``PRIMARY KEY`` clause names two - columns, each ``UserEvents`` key has two elements; the first is the - ``UserName``, and the second is the ``EventDate``. - - Key ranges with multiple components are interpreted lexicographically by + __doc__="""KeyRange represents a range of rows in a table or index. A range has + a start key and an end key. These keys can be open or closed, + indicating if the range includes rows with that key. Keys are + represented by lists, where the ith value in the list corresponds to + the ith component of the table or index primary key. Individual values + are encoded as described [here][google.spanner.v1.TypeCode]. For + example, consider the following table definition: :: CREATE + TABLE UserEvents ( UserName STRING(MAX), EventDate + STRING(10) ) PRIMARY KEY(UserName, EventDate); The following keys + name rows in this table: :: ["Bob", "2014-09-23"] ["Alfred", + "2015-06-12"] Since the ``UserEvents`` table's ``PRIMARY KEY`` clause + names two columns, each ``UserEvents`` key has two elements; the first + is the ``UserName``, and the second is the ``EventDate``. Key ranges + with multiple components are interpreted lexicographically by component using the table or index key's declared sort order. For - example, the following range returns all events for user ``"Bob"`` that - occurred in the year 2015: - - :: - - "start_closed": ["Bob", "2015-01-01"] - "end_closed": ["Bob", "2015-12-31"] - - Start and end keys can omit trailing key components. This affects the - inclusion and exclusion of rows that exactly match the provided key - components: if the key is closed, then rows that exactly match the - provided components are included; if the key is open, then rows that - exactly match are not included. - - For example, the following range includes all events for ``"Bob"`` that - occurred during and after the year 2000: - - :: - - "start_closed": ["Bob", "2000-01-01"] - "end_closed": ["Bob"] - - The next example retrieves all events for ``"Bob"``: - - :: - - "start_closed": ["Bob"] - "end_closed": ["Bob"] - - To retrieve events before the year 2000: - - :: - - "start_closed": ["Bob"] - "end_open": ["Bob", "2000-01-01"] - - The following range includes all rows in the table: - - :: - - "start_closed": [] - "end_closed": [] - - This range returns all users whose ``UserName`` begins with any - character from A to C: - - :: - - "start_closed": ["A"] - "end_open": ["D"] - - This range returns all users whose ``UserName`` begins with B: - - :: - - "start_closed": ["B"] - "end_open": ["C"] - - Key ranges honor column sort order. For example, suppose a table is - defined as follows: - - :: - - CREATE TABLE DescendingSortedTable { - Key INT64, - ... - ) PRIMARY KEY(Key DESC); - - The following range retrieves all rows with key values between 1 and 100 - inclusive: - - :: - - "start_closed": ["100"] - "end_closed": ["1"] - - Note that 100 is passed as the start, and 1 is passed as the end, - because ``Key`` is a descending column in the schema. - - + example, the following range returns all events for user ``"Bob"`` + that occurred in the year 2015: :: "start_closed": ["Bob", + "2015-01-01"] "end_closed": ["Bob", "2015-12-31"] Start and end + keys can omit trailing key components. This affects the inclusion and + exclusion of rows that exactly match the provided key components: if + the key is closed, then rows that exactly match the provided + components are included; if the key is open, then rows that exactly + match are not included. For example, the following range includes all + events for ``"Bob"`` that occurred during and after the year 2000: :: + "start_closed": ["Bob", "2000-01-01"] "end_closed": ["Bob"] The + next example retrieves all events for ``"Bob"``: :: + "start_closed": ["Bob"] "end_closed": ["Bob"] To retrieve events + before the year 2000: :: "start_closed": ["Bob"] "end_open": + ["Bob", "2000-01-01"] The following range includes all rows in the + table: :: "start_closed": [] "end_closed": [] This range + returns all users whose ``UserName`` begins with any character from A + to C: :: "start_closed": ["A"] "end_open": ["D"] This range + returns all users whose ``UserName`` begins with B: :: + "start_closed": ["B"] "end_open": ["C"] Key ranges honor column + sort order. For example, suppose a table is defined as follows: :: + CREATE TABLE DescendingSortedTable { Key INT64, ... ) + PRIMARY KEY(Key DESC); The following range retrieves all rows with + key values between 1 and 100 inclusive: :: "start_closed": + ["100"] "end_closed": ["1"] Note that 100 is passed as the start, + and 1 is passed as the end, because ``Key`` is a descending column in + the schema. Attributes: start_key_type: The start key must be provided. It can be either closed or @@ -412,15 +341,12 @@ dict( DESCRIPTOR=_KEYSET, __module__="google.cloud.spanner_v1.proto.keys_pb2", - __doc__="""\ ``KeySet`` defines a collection of Cloud Spanner keys - and/or key ranges. All the keys are expected to be in the same table or - index. The keys need not be sorted in any particular way. - - If the same key is specified multiple times in the set (for example if - two ranges, two keys, or a key and a range overlap), Cloud Spanner - behaves as if the key were only specified once. - - + __doc__="""\ ``KeySet`` defines a collection of Cloud Spanner keys and/or key + ranges. All the keys are expected to be in the same table or index. + The keys need not be sorted in any particular way. If the same key is + specified multiple times in the set (for example if two ranges, two + keys, or a key and a range overlap), Cloud Spanner behaves as if the + key were only specified once. Attributes: keys: A list of specific keys. Entries in ``keys`` should have diff --git a/google/cloud/spanner_v1/proto/mutation_pb2.py b/google/cloud/spanner_v1/proto/mutation_pb2.py index b6ad0429b8..e330884c2d 100644 --- a/google/cloud/spanner_v1/proto/mutation_pb2.py +++ b/google/cloud/spanner_v1/proto/mutation_pb2.py @@ -338,10 +338,8 @@ __module__="google.cloud.spanner_v1.proto.mutation_pb2", __doc__="""Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], - [insert\_or\_update][google.spanner.v1.Mutation.insert\_or\_update], and - [replace][google.spanner.v1.Mutation.replace] operations. - - + [insert\_or\_update][google.spanner.v1.Mutation.insert\_or\_update], + and [replace][google.spanner.v1.Mutation.replace] operations. Attributes: table: Required. The table whose rows will be written. @@ -373,10 +371,7 @@ dict( DESCRIPTOR=_MUTATION_DELETE, __module__="google.cloud.spanner_v1.proto.mutation_pb2", - __doc__="""Arguments to [delete][google.spanner.v1.Mutation.delete] - operations. - - + __doc__="""Arguments to [delete][google.spanner.v1.Mutation.delete] operations. Attributes: table: Required. The table whose rows will be deleted. @@ -394,11 +389,9 @@ ), DESCRIPTOR=_MUTATION, __module__="google.cloud.spanner_v1.proto.mutation_pb2", - __doc__="""A modification to one or more Cloud Spanner rows. - Mutations can be applied to a Cloud Spanner database by sending them in - a [Commit][google.spanner.v1.Spanner.Commit] call. - - + __doc__="""A modification to one or more Cloud Spanner rows. Mutations can be + applied to a Cloud Spanner database by sending them in a + [Commit][google.spanner.v1.Spanner.Commit] call. Attributes: operation: Required. The operation to perform. diff --git a/google/cloud/spanner_v1/proto/query_plan_pb2.py b/google/cloud/spanner_v1/proto/query_plan_pb2.py index bc715b4549..febdab0750 100644 --- a/google/cloud/spanner_v1/proto/query_plan_pb2.py +++ b/google/cloud/spanner_v1/proto/query_plan_pb2.py @@ -470,10 +470,8 @@ dict( DESCRIPTOR=_PLANNODE_CHILDLINK, __module__="google.cloud.spanner_v1.proto.query_plan_pb2", - __doc__="""Metadata associated with a parent-child relationship - appearing in a [PlanNode][google.spanner.v1.PlanNode]. - - + __doc__="""Metadata associated with a parent-child relationship appearing in a + [PlanNode][google.spanner.v1.PlanNode]. Attributes: child_index: The node to which the link points. @@ -513,8 +511,6 @@ __module__="google.cloud.spanner_v1.proto.query_plan_pb2", __doc__="""Condensed representation of a node and its subtree. Only present for ``SCALAR`` [PlanNode(s)][google.spanner.v1.PlanNode]. - - Attributes: description: A string representation of the expression subtree rooted at @@ -533,8 +529,6 @@ __module__="google.cloud.spanner_v1.proto.query_plan_pb2", __doc__="""Node information for nodes appearing in a [QueryPlan.plan\_nodes][google.spanner.v1.QueryPlan.plan\_nodes]. - - Attributes: index: The ``PlanNode``'s index in [node @@ -580,10 +574,7 @@ dict( DESCRIPTOR=_QUERYPLAN, __module__="google.cloud.spanner_v1.proto.query_plan_pb2", - __doc__="""Contains an ordered list of nodes appearing in the query - plan. - - + __doc__="""Contains an ordered list of nodes appearing in the query plan. Attributes: plan_nodes: The nodes in the query plan. Plan nodes are returned in pre- diff --git a/google/cloud/spanner_v1/proto/result_set_pb2.py b/google/cloud/spanner_v1/proto/result_set_pb2.py index 3740450e6b..6890ec1d34 100644 --- a/google/cloud/spanner_v1/proto/result_set_pb2.py +++ b/google/cloud/spanner_v1/proto/result_set_pb2.py @@ -443,8 +443,6 @@ __module__="google.cloud.spanner_v1.proto.result_set_pb2", __doc__="""Results from [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. - - Attributes: metadata: Metadata about the result set, such as row type information. @@ -478,11 +476,9 @@ dict( DESCRIPTOR=_PARTIALRESULTSET, __module__="google.cloud.spanner_v1.proto.result_set_pb2", - __doc__="""Partial results from a streaming read or SQL query. - Streaming reads and SQL queries better tolerate large result sets, large - rows, and large values, but are a little trickier to consume. - - + __doc__="""Partial results from a streaming read or SQL query. Streaming reads + and SQL queries better tolerate large result sets, large rows, and + large values, but are a little trickier to consume. Attributes: metadata: Metadata about the result set, such as row type information. @@ -564,10 +560,8 @@ dict( DESCRIPTOR=_RESULTSETMETADATA, __module__="google.cloud.spanner_v1.proto.result_set_pb2", - __doc__="""Metadata about a [ResultSet][google.spanner.v1.ResultSet] - or [PartialResultSet][google.spanner.v1.PartialResultSet]. - - + __doc__="""Metadata about a [ResultSet][google.spanner.v1.ResultSet] or + [PartialResultSet][google.spanner.v1.PartialResultSet]. Attributes: row_type: Indicates the field names and types for the rows in the result @@ -591,11 +585,8 @@ dict( DESCRIPTOR=_RESULTSETSTATS, __module__="google.cloud.spanner_v1.proto.result_set_pb2", - __doc__="""Additional statistics about a - [ResultSet][google.spanner.v1.ResultSet] or - [PartialResultSet][google.spanner.v1.PartialResultSet]. - - + __doc__="""Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] + or [PartialResultSet][google.spanner.v1.PartialResultSet]. Attributes: query_plan: [QueryPlan][google.spanner.v1.QueryPlan] for the query diff --git a/google/cloud/spanner_v1/proto/spanner_pb2.py b/google/cloud/spanner_v1/proto/spanner_pb2.py index ab1ff4e42e..4e694921ad 100644 --- a/google/cloud/spanner_v1/proto/spanner_pb2.py +++ b/google/cloud/spanner_v1/proto/spanner_pb2.py @@ -2332,8 +2332,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [CreateSession][google.spanner.v1.Spanner.CreateSession]. - - Attributes: database: Required. The database in which the new session is created. @@ -2353,8 +2351,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. - - Attributes: database: Required. The database in which the new sessions are created. @@ -2381,8 +2377,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. - - Attributes: session: The freshly created sessions. @@ -2408,8 +2402,6 @@ DESCRIPTOR=_SESSION, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""A session in the Cloud Spanner API. - - Attributes: name: The name of the session. This is always system-assigned; @@ -2443,10 +2435,7 @@ dict( DESCRIPTOR=_GETSESSIONREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for - [GetSession][google.spanner.v1.Spanner.GetSession]. - - + __doc__="""The request for [GetSession][google.spanner.v1.Spanner.GetSession]. Attributes: name: Required. The name of the session to retrieve. @@ -2464,8 +2453,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [ListSessions][google.spanner.v1.Spanner.ListSessions]. - - Attributes: database: Required. The database in which to list sessions. @@ -2499,8 +2486,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The response for [ListSessions][google.spanner.v1.Spanner.ListSessions]. - - Attributes: sessions: The list of requested sessions. @@ -2522,8 +2507,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession]. - - Attributes: name: Required. The name of the session to delete. @@ -2544,8 +2527,6 @@ DESCRIPTOR=_EXECUTESQLREQUEST_QUERYOPTIONS, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""Query optimizer configuration. - - Attributes: optimizer_version: An option to control the selection of optimizer version. This @@ -2577,11 +2558,8 @@ ), DESCRIPTOR=_EXECUTESQLREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for - [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and + __doc__="""The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. - - Attributes: session: Required. The session in which the SQL query should be @@ -2680,8 +2658,6 @@ DESCRIPTOR=_EXECUTEBATCHDMLREQUEST_STATEMENT, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""A single DML statement. - - Attributes: sql: Required. The DML string. @@ -2713,8 +2689,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. - - Attributes: session: Required. The session in which the DML statements should be @@ -2755,38 +2729,27 @@ DESCRIPTOR=_EXECUTEBATCHDMLRESPONSE, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The response for - [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a - list of [ResultSet][google.spanner.v1.ResultSet] messages, one for each - DML statement that has successfully executed, in the same order as the - statements in the request. If a statement fails, the status in the - response body identifies the cause of the failure. - - To check for DML statements that failed, use the following approach: - - 1. Check the status in the response message. The - [google.rpc.Code][google.rpc.Code] enum value ``OK`` indicates that - all statements were executed successfully. - 2. If the status was not ``OK``, check the number of result sets in the - response. If the response contains ``N`` - [ResultSet][google.spanner.v1.ResultSet] messages, then statement - ``N+1`` in the request failed. - - Example 1: - - - Request: 5 DML statements, all executed successfully. - - Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with - the status ``OK``. - - Example 2: - - - Request: 5 DML statements. The third statement has a syntax error. - - Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a - syntax error (``INVALID_ARGUMENT``) status. The number of - [ResultSet][google.spanner.v1.ResultSet] messages indicates that the - third statement failed, and the fourth and fifth statements were not - executed. - - + [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains + a list of [ResultSet][google.spanner.v1.ResultSet] messages, one for + each DML statement that has successfully executed, in the same order + as the statements in the request. If a statement fails, the status in + the response body identifies the cause of the failure. To check for + DML statements that failed, use the following approach: 1. Check the + status in the response message. The + [google.rpc.Code][google.rpc.Code] enum value ``OK`` indicates that + all statements were executed successfully. 2. If the status was not + ``OK``, check the number of result sets in the response. If the + response contains ``N`` [ResultSet][google.spanner.v1.ResultSet] + messages, then statement ``N+1`` in the request failed. Example 1: + - Request: 5 DML statements, all executed successfully. - Response: + 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the + status ``OK``. Example 2: - Request: 5 DML statements. The third + statement has a syntax error. - Response: 2 + [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax + error (``INVALID_ARGUMENT``) status. The number of + [ResultSet][google.spanner.v1.ResultSet] messages indicates that the + third statement failed, and the fourth and fifth statements were not + executed. Attributes: result_sets: One [ResultSet][google.spanner.v1.ResultSet] for each @@ -2815,10 +2778,7 @@ dict( DESCRIPTOR=_PARTITIONOPTIONS, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""Options for a PartitionQueryRequest and - PartitionReadRequest. - - + __doc__="""Options for a PartitionQueryRequest and PartitionReadRequest. Attributes: partition_size_bytes: \ **Note:** This hint is currently ignored by PartitionQuery @@ -2857,8 +2817,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] - - Attributes: session: Required. The session used to create the partitions. @@ -2915,8 +2873,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead] - - Attributes: session: Required. The session used to create the partitions. @@ -2970,8 +2926,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""Information returned for each partition returned in a PartitionResponse. - - Attributes: partition_token: This token can be passed to Read, StreamingRead, ExecuteSql, @@ -2992,8 +2946,6 @@ __doc__="""The response for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] or [PartitionRead][google.spanner.v1.Spanner.PartitionRead] - - Attributes: partitions: Partitions created by this request. @@ -3013,8 +2965,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. - - Attributes: session: Required. The session in which the read should be performed. @@ -3087,8 +3037,6 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. - - Attributes: session: Required. The session in which the transaction runs. @@ -3106,10 +3054,7 @@ dict( DESCRIPTOR=_COMMITREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for - [Commit][google.spanner.v1.Spanner.Commit]. - - + __doc__="""The request for [Commit][google.spanner.v1.Spanner.Commit]. Attributes: session: Required. The session in which the transaction to be committed @@ -3144,10 +3089,7 @@ dict( DESCRIPTOR=_COMMITRESPONSE, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The response for - [Commit][google.spanner.v1.Spanner.Commit]. - - + __doc__="""The response for [Commit][google.spanner.v1.Spanner.Commit]. Attributes: commit_timestamp: The Cloud Spanner timestamp at which the transaction @@ -3164,10 +3106,7 @@ dict( DESCRIPTOR=_ROLLBACKREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for - [Rollback][google.spanner.v1.Spanner.Rollback]. - - + __doc__="""The request for [Rollback][google.spanner.v1.Spanner.Rollback]. Attributes: session: Required. The session in which the transaction to roll back is diff --git a/google/cloud/spanner_v1/proto/transaction_pb2.py b/google/cloud/spanner_v1/proto/transaction_pb2.py index aa83e3373c..24f6a3fa7a 100644 --- a/google/cloud/spanner_v1/proto/transaction_pb2.py +++ b/google/cloud/spanner_v1/proto/transaction_pb2.py @@ -548,10 +548,8 @@ dict( DESCRIPTOR=_TRANSACTIONOPTIONS_READWRITE, __module__="google.cloud.spanner_v1.proto.transaction_pb2", - __doc__="""Message type to initiate a read-write transaction. - Currently this transaction type has no options. - - """, + __doc__="""Message type to initiate a read-write transaction. Currently this + transaction type has no options.""", # @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions.ReadWrite) ), ), @@ -561,9 +559,7 @@ dict( DESCRIPTOR=_TRANSACTIONOPTIONS_PARTITIONEDDML, __module__="google.cloud.spanner_v1.proto.transaction_pb2", - __doc__="""Message type to initiate a Partitioned DML transaction. - - """, + __doc__="""Message type to initiate a Partitioned DML transaction.""", # @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions.PartitionedDml) ), ), @@ -574,8 +570,6 @@ DESCRIPTOR=_TRANSACTIONOPTIONS_READONLY, __module__="google.cloud.spanner_v1.proto.transaction_pb2", __doc__="""Message type to initiate a read-only transaction. - - Attributes: timestamp_bound: How to choose the timestamp for the read-only transaction. @@ -632,50 +626,34 @@ ), DESCRIPTOR=_TRANSACTIONOPTIONS, __module__="google.cloud.spanner_v1.proto.transaction_pb2", - __doc__="""# Transactions - - Each session can have at most one active transaction at a time. After - the active transaction is completed, the session can immediately be - re-used for the next transaction. It is not necessary to create a new - session for each transaction. - - Transaction Modes - - - Cloud Spanner supports three transaction modes: - - 1. Locking read-write. This type of transaction is the only way to write - data into Cloud Spanner. These transactions rely on pessimistic - locking and, if necessary, two-phase commit. Locking read-write - transactions may abort, requiring the application to retry. - - 2. Snapshot read-only. This transaction type provides guaranteed - consistency across several reads, but does not allow writes. Snapshot - read-only transactions can be configured to read at timestamps in the - past. Snapshot read-only transactions do not need to be committed. - - 3. Partitioned DML. This type of transaction is used to execute a single - Partitioned DML statement. Partitioned DML partitions the key space - and runs the DML statement over each partition in parallel using - separate, internal transactions that commit independently. - Partitioned DML transactions do not need to be committed. - - For transactions that only read, snapshot read-only transactions provide - simpler semantics and are almost always faster. In particular, read-only - transactions do not take locks, so they do not conflict with read-write - transactions. As a consequence of not taking locks, they also do not - abort, so retry loops are not needed. - - Transactions may only read/write data in a single database. They may, - however, read/write data in different tables within that database. - - Locking Read-Write Transactions - - - Locking transactions may be used to atomically read-modify-write data - anywhere in a database. This type of transaction is externally - consistent. - + __doc__="""# Transactions Each session can have at most one active transaction + at a time. After the active transaction is completed, the session can + immediately be re-used for the next transaction. It is not necessary + to create a new session for each transaction. Transaction Modes + Cloud Spanner supports three transaction modes: 1. + Locking read-write. This type of transaction is the only way to write + data into Cloud Spanner. These transactions rely on pessimistic + locking and, if necessary, two-phase commit. Locking read-write + transactions may abort, requiring the application to retry. 2. + Snapshot read-only. This transaction type provides guaranteed + consistency across several reads, but does not allow writes. Snapshot + read-only transactions can be configured to read at timestamps in the + past. Snapshot read-only transactions do not need to be committed. 3. + Partitioned DML. This type of transaction is used to execute a single + Partitioned DML statement. Partitioned DML partitions the key space + and runs the DML statement over each partition in parallel using + separate, internal transactions that commit independently. + Partitioned DML transactions do not need to be committed. For + transactions that only read, snapshot read-only transactions provide + simpler semantics and are almost always faster. In particular, read- + only transactions do not take locks, so they do not conflict with + read-write transactions. As a consequence of not taking locks, they + also do not abort, so retry loops are not needed. Transactions may + only read/write data in a single database. They may, however, + read/write data in different tables within that database. Locking + Read-Write Transactions Locking + transactions may be used to atomically read-modify-write data anywhere + in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as @@ -683,242 +661,162 @@ not been terminated by [Commit][google.spanner.v1.Spanner.Commit] or [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of inactivity at the client may cause Cloud Spanner to release a - transaction's locks and abort it. - - Conceptually, a read-write transaction consists of zero or more reads or - SQL statements followed by [Commit][google.spanner.v1.Spanner.Commit]. - At any time before [Commit][google.spanner.v1.Spanner.Commit], the - client can send a [Rollback][google.spanner.v1.Spanner.Rollback] request - to abort the transaction. - - Semantics - - - Cloud Spanner can commit the transaction if all read locks it acquired - are still valid at commit time, and it is able to acquire write locks - for all writes. Cloud Spanner can abort the transaction for any reason. - If a commit attempt returns ``ABORTED``, Cloud Spanner guarantees that - the transaction has not modified any user data in Cloud Spanner. - - Unless the transaction commits, Cloud Spanner makes no guarantees about - how long the transaction's locks were held for. It is an error to use - Cloud Spanner locks for any sort of mutual exclusion other than between - Cloud Spanner transactions themselves. - - Retrying Aborted Transactions - - - When a transaction aborts, the application can choose to retry the whole - transaction again. To maximize the chances of successfully committing - the retry, the client should execute the retry in the same session as - the original attempt. The original session's lock priority increases - with each consecutive abort, meaning that each attempt has a slightly - better chance of success than the previous. - - Under some circumstances (e.g., many transactions attempting to modify - the same row(s)), a transaction can abort many times in a short period - before successfully committing. Thus, it is not a good idea to cap the - number of retries a transaction can attempt; instead, it is better to - limit the total amount of wall time spent retrying. - - Idle Transactions - - - A transaction is considered idle if it has no outstanding reads or SQL + transaction's locks and abort it. Conceptually, a read-write + transaction consists of zero or more reads or SQL statements followed + by [Commit][google.spanner.v1.Spanner.Commit]. At any time before + [Commit][google.spanner.v1.Spanner.Commit], the client can send a + [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the + transaction. Semantics Cloud Spanner can commit the + transaction if all read locks it acquired are still valid at commit + time, and it is able to acquire write locks for all writes. Cloud + Spanner can abort the transaction for any reason. If a commit attempt + returns ``ABORTED``, Cloud Spanner guarantees that the transaction has + not modified any user data in Cloud Spanner. Unless the transaction + commits, Cloud Spanner makes no guarantees about how long the + transaction's locks were held for. It is an error to use Cloud Spanner + locks for any sort of mutual exclusion other than between Cloud + Spanner transactions themselves. Retrying Aborted Transactions + When a transaction aborts, the + application can choose to retry the whole transaction again. To + maximize the chances of successfully committing the retry, the client + should execute the retry in the same session as the original attempt. + The original session's lock priority increases with each consecutive + abort, meaning that each attempt has a slightly better chance of + success than the previous. Under some circumstances (e.g., many + transactions attempting to modify the same row(s)), a transaction can + abort many times in a short period before successfully committing. + Thus, it is not a good idea to cap the number of retries a transaction + can attempt; instead, it is better to limit the total amount of wall + time spent retrying. Idle Transactions A + transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 - seconds. Idle transactions can be aborted by Cloud Spanner so that they - don't hold on to locks indefinitely. In that case, the commit will fail - with error ``ABORTED``. - - If this behavior is undesirable, periodically executing a simple SQL - query in the transaction (e.g., ``SELECT 1``) prevents the transaction - from becoming idle. - - Snapshot Read-Only Transactions - - - Snapshot read-only transactions provides a simpler method than locking - read-write transactions for doing several consistent reads. However, - this type of transaction does not support writes. - - Snapshot transactions do not take locks. Instead, they work by choosing - a Cloud Spanner timestamp, then executing all reads at that timestamp. - Since they do not acquire locks, they do not block concurrent read-write - transactions. - - Unlike locking read-write transactions, snapshot read-only transactions - never abort. They can fail if the chosen read timestamp is garbage + seconds. Idle transactions can be aborted by Cloud Spanner so that + they don't hold on to locks indefinitely. In that case, the commit + will fail with error ``ABORTED``. If this behavior is undesirable, + periodically executing a simple SQL query in the transaction (e.g., + ``SELECT 1``) prevents the transaction from becoming idle. Snapshot + Read-Only Transactions Snapshot read- + only transactions provides a simpler method than locking read-write + transactions for doing several consistent reads. However, this type of + transaction does not support writes. Snapshot transactions do not + take locks. Instead, they work by choosing a Cloud Spanner timestamp, + then executing all reads at that timestamp. Since they do not acquire + locks, they do not block concurrent read-write transactions. Unlike + locking read-write transactions, snapshot read-only transactions never + abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in - practice. - - Snapshot read-only transactions do not need to call + practice. Snapshot read-only transactions do not need to call [Commit][google.spanner.v1.Spanner.Commit] or [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not - permitted to do so). - - To execute a snapshot transaction, the client specifies a timestamp - bound, which tells Cloud Spanner how to choose a read timestamp. - - The types of timestamp bound are: - - - Strong (the default). - - Bounded staleness. - - Exact staleness. - - If the Cloud Spanner database to be read is geographically distributed, - stale read-only transactions can execute more quickly than strong or - read-write transaction, because they are able to execute far from the - leader replica. - - Each type of timestamp bound is discussed in detail below. - - Strong - - - Strong reads are guaranteed to see the effects of all transactions that - have committed before the start of the read. Furthermore, all rows - yielded by a single read are consistent with each other -- if any part - of the read observes a transaction, all parts of the read see the - transaction. - - Strong reads are not repeatable: two consecutive strong read-only - transactions might return inconsistent results if there are concurrent - writes. If consistency across reads is required, the reads should be - executed within a transaction or at an exact read timestamp. - - See - [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. - - Exact Staleness - - - These timestamp bounds execute reads at a user-specified timestamp. - Reads at a timestamp are guaranteed to see a consistent prefix of the - global transaction history: they observe modifications done by all - transactions with a commit timestamp <= the read timestamp, and observe - none of the modifications done by transactions with a larger commit - timestamp. They will block until all conflicting transactions that may - be assigned commit timestamps <= the read timestamp have finished. - - The timestamp can either be expressed as an absolute Cloud Spanner - commit timestamp or a staleness relative to the current time. - - These modes do not require a "negotiation phase" to pick a timestamp. As - a result, they execute slightly faster than the equivalent boundedly - stale concurrency modes. On the other hand, boundedly stale reads - usually return fresher results. - - See - [TransactionOptions.ReadOnly.read\_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read\_timestamp] - and - [TransactionOptions.ReadOnly.exact\_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact\_staleness]. - - Bounded Staleness - - - Bounded staleness modes allow Cloud Spanner to pick the read timestamp, - subject to a user-provided staleness bound. Cloud Spanner chooses the - newest timestamp within the staleness bound that allows execution of the - reads at the closest available replica without blocking. - - All rows yielded are consistent with each other -- if any part of the - read observes a transaction, all parts of the read see the transaction. - Boundedly stale reads are not repeatable: two stale reads, even if they - use the same staleness bound, can execute at different timestamps and - thus return inconsistent results. - - Boundedly stale reads execute in two phases: the first phase negotiates - a timestamp among all replicas needed to serve the read. In the second - phase, reads are executed at the negotiated timestamp. - - As a result of the two phase execution, bounded staleness reads are - usually a little slower than comparable exact staleness reads. However, - they are typically able to return fresher results, and are more likely - to execute at the closest replica. - - Because the timestamp negotiation requires up-front knowledge of which - rows will be read, it can only be used with single-use read-only - transactions. - - See - [TransactionOptions.ReadOnly.max\_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max\_staleness] - and - [TransactionOptions.ReadOnly.min\_read\_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min\_read\_timestamp]. - - Old Read Timestamps and Garbage Collection - - - Cloud Spanner continuously garbage collects deleted and overwritten data - in the background to reclaim storage space. This process is known as - "version GC". By default, version GC reclaims versions after they are - one hour old. Because of this, Cloud Spanner cannot perform reads at - read timestamps more than one hour in the past. This restriction also - applies to in-progress reads and/or SQL queries whose timestamp become - too old while executing. Reads and SQL queries with too-old read - timestamps fail with the error ``FAILED_PRECONDITION``. - - Partitioned DML Transactions - - - Partitioned DML transactions are used to execute DML statements with a - different execution strategy that provides different, and often better, - scalability properties for large, table-wide operations than DML in a - ReadWrite transaction. Smaller scoped statements, such as an OLTP - workload, should prefer using ReadWrite transactions. - - Partitioned DML partitions the keyspace and runs the DML statement on - each partition in separate, internal transactions. These transactions - commit automatically when complete, and run independently from one - another. - - To reduce lock contention, this execution strategy only acquires read - locks on rows that match the WHERE clause of the statement. - Additionally, the smaller per-partition transactions hold locks for less - time. - - That said, Partitioned DML is not a drop-in replacement for standard DML - used in ReadWrite transactions. - - - The DML statement must be fully-partitionable. Specifically, the - statement must be expressible as the union of many statements which - each access only a single row of the table. - - - The statement is not applied atomically to all rows of the table. - Rather, the statement is applied atomically to partitions of the - table, in independent transactions. Secondary index rows are updated - atomically with the base table rows. - - - Partitioned DML does not guarantee exactly-once execution semantics - against a partition. The statement will be applied at least once to - each partition. It is strongly recommended that the DML statement - should be idempotent to avoid unexpected results. For instance, it is - potentially dangerous to run a statement such as - ``UPDATE table SET column = column + 1`` as it could be run multiple - times against some rows. - - - The partitions are committed automatically - there is no support for - Commit or Rollback. If the call returns an error, or if the client - issuing the ExecuteSql call dies, it is possible that some rows had - the statement executed on them successfully. It is also possible that - statement was never executed against other rows. - + permitted to do so). To execute a snapshot transaction, the client + specifies a timestamp bound, which tells Cloud Spanner how to choose a + read timestamp. The types of timestamp bound are: - Strong (the + default). - Bounded staleness. - Exact staleness. If the Cloud + Spanner database to be read is geographically distributed, stale read- + only transactions can execute more quickly than strong or read-write + transaction, because they are able to execute far from the leader + replica. Each type of timestamp bound is discussed in detail below. + Strong Strong reads are guaranteed to see the effects of all + transactions that have committed before the start of the read. + Furthermore, all rows yielded by a single read are consistent with + each other -- if any part of the read observes a transaction, all + parts of the read see the transaction. Strong reads are not + repeatable: two consecutive strong read-only transactions might return + inconsistent results if there are concurrent writes. If consistency + across reads is required, the reads should be executed within a + transaction or at an exact read timestamp. See [TransactionOptions.Re + adOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. + Exact Staleness These timestamp bounds execute reads + at a user-specified timestamp. Reads at a timestamp are guaranteed to + see a consistent prefix of the global transaction history: they + observe modifications done by all transactions with a commit timestamp + <= the read timestamp, and observe none of the modifications done by + transactions with a larger commit timestamp. They will block until all + conflicting transactions that may be assigned commit timestamps <= the + read timestamp have finished. The timestamp can either be expressed + as an absolute Cloud Spanner commit timestamp or a staleness relative + to the current time. These modes do not require a "negotiation phase" + to pick a timestamp. As a result, they execute slightly faster than + the equivalent boundedly stale concurrency modes. On the other hand, + boundedly stale reads usually return fresher results. See [Transactio + nOptions.ReadOnly.read\_timestamp][google.spanner.v1.TransactionOption + s.ReadOnly.read\_timestamp] and [TransactionOptions.ReadOnly.exact\_st + aleness][google.spanner.v1.TransactionOptions.ReadOnly.exact\_stalenes + s]. Bounded Staleness Bounded staleness modes + allow Cloud Spanner to pick the read timestamp, subject to a user- + provided staleness bound. Cloud Spanner chooses the newest timestamp + within the staleness bound that allows execution of the reads at the + closest available replica without blocking. All rows yielded are + consistent with each other -- if any part of the read observes a + transaction, all parts of the read see the transaction. Boundedly + stale reads are not repeatable: two stale reads, even if they use the + same staleness bound, can execute at different timestamps and thus + return inconsistent results. Boundedly stale reads execute in two + phases: the first phase negotiates a timestamp among all replicas + needed to serve the read. In the second phase, reads are executed at + the negotiated timestamp. As a result of the two phase execution, + bounded staleness reads are usually a little slower than comparable + exact staleness reads. However, they are typically able to return + fresher results, and are more likely to execute at the closest + replica. Because the timestamp negotiation requires up-front + knowledge of which rows will be read, it can only be used with single- + use read-only transactions. See [TransactionOptions.ReadOnly.max\_sta + leness][google.spanner.v1.TransactionOptions.ReadOnly.max\_staleness] + and [TransactionOptions.ReadOnly.min\_read\_timestamp][google.spanner. + v1.TransactionOptions.ReadOnly.min\_read\_timestamp]. Old Read + Timestamps and Garbage Collection + Cloud Spanner continuously + garbage collects deleted and overwritten data in the background to + reclaim storage space. This process is known as "version GC". By + default, version GC reclaims versions after they are one hour old. + Because of this, Cloud Spanner cannot perform reads at read timestamps + more than one hour in the past. This restriction also applies to in- + progress reads and/or SQL queries whose timestamp become too old while + executing. Reads and SQL queries with too-old read timestamps fail + with the error ``FAILED_PRECONDITION``. Partitioned DML Transactions + Partitioned DML transactions are used to + execute DML statements with a different execution strategy that + provides different, and often better, scalability properties for + large, table-wide operations than DML in a ReadWrite transaction. + Smaller scoped statements, such as an OLTP workload, should prefer + using ReadWrite transactions. Partitioned DML partitions the keyspace + and runs the DML statement on each partition in separate, internal + transactions. These transactions commit automatically when complete, + and run independently from one another. To reduce lock contention, + this execution strategy only acquires read locks on rows that match + the WHERE clause of the statement. Additionally, the smaller per- + partition transactions hold locks for less time. That said, + Partitioned DML is not a drop-in replacement for standard DML used in + ReadWrite transactions. - The DML statement must be fully- + partitionable. Specifically, the statement must be expressible as + the union of many statements which each access only a single row of + the table. - The statement is not applied atomically to all rows of + the table. Rather, the statement is applied atomically to + partitions of the table, in independent transactions. Secondary + index rows are updated atomically with the base table rows. - + Partitioned DML does not guarantee exactly-once execution semantics + against a partition. The statement will be applied at least once to + each partition. It is strongly recommended that the DML statement + should be idempotent to avoid unexpected results. For instance, it is + potentially dangerous to run a statement such as ``UPDATE table SET + column = column + 1`` as it could be run multiple times against + some rows. - The partitions are committed automatically - there is + no support for Commit or Rollback. If the call returns an error, or + if the client issuing the ExecuteSql call dies, it is possible that + some rows had the statement executed on them successfully. It is + also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a - single DML statement via ExecuteSql or ExecuteStreamingSql. - - - If any error is encountered during the execution of the partitioned - DML operation (for instance, a UNIQUE INDEX violation, division by - zero, or a value that cannot be stored due to schema constraints), - then the operation is stopped at that point and an error is returned. - It is possible that at this point, some partitions have been - committed (or even committed multiple times), and other partitions - have not been run at all. - - Given the above, Partitioned DML is good fit for large, database-wide, - operations that are idempotent, such as deleting old rows from a very - large table. - - + single DML statement via ExecuteSql or ExecuteStreamingSql. - If any + error is encountered during the execution of the partitioned DML + operation (for instance, a UNIQUE INDEX violation, division by + zero, or a value that cannot be stored due to schema constraints), + then the operation is stopped at that point and an error is returned. + It is possible that at this point, some partitions have been + committed (or even committed multiple times), and other partitions + have not been run at all. Given the above, Partitioned DML is good + fit for large, database-wide, operations that are idempotent, such as + deleting old rows from a very large table. Attributes: mode: Required. The type of transaction. @@ -953,8 +851,6 @@ DESCRIPTOR=_TRANSACTION, __module__="google.cloud.spanner_v1.proto.transaction_pb2", __doc__="""A transaction. - - Attributes: id: \ ``id`` may be used to identify the transaction in subsequent @@ -985,12 +881,9 @@ __module__="google.cloud.spanner_v1.proto.transaction_pb2", __doc__="""This message is used to select the transaction in which a [Read][google.spanner.v1.Spanner.Read] or - [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. - - See [TransactionOptions][google.spanner.v1.TransactionOptions] for more + [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. See + [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions. - - Attributes: selector: If no fields are set, the default is a single use transaction diff --git a/google/cloud/spanner_v1/proto/type_pb2.py b/google/cloud/spanner_v1/proto/type_pb2.py index 2ef35b36c6..3b287cd392 100644 --- a/google/cloud/spanner_v1/proto/type_pb2.py +++ b/google/cloud/spanner_v1/proto/type_pb2.py @@ -279,10 +279,8 @@ dict( DESCRIPTOR=_TYPE, __module__="google.cloud.spanner_v1.proto.type_pb2", - __doc__="""\ ``Type`` indicates the type of a Cloud Spanner value, as - might be stored in a table cell or returned from an SQL query. - - + __doc__="""\ ``Type`` indicates the type of a Cloud Spanner value, as might be + stored in a table cell or returned from an SQL query. Attributes: code: Required. The [TypeCode][google.spanner.v1.TypeCode] for this @@ -313,8 +311,6 @@ DESCRIPTOR=_STRUCTTYPE_FIELD, __module__="google.cloud.spanner_v1.proto.type_pb2", __doc__="""Message representing a single field of a struct. - - Attributes: name: The name of the field. For reads, this is the column name. For @@ -334,8 +330,6 @@ __module__="google.cloud.spanner_v1.proto.type_pb2", __doc__="""\ ``StructType`` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. - - Attributes: fields: The list of fields that make up this struct. Order is diff --git a/setup.cfg b/setup.cfg index 3bd555500e..c3a2b39f65 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/synth.metadata b/synth.metadata index bb226f324a..65874481f1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,32 @@ { - "updateTime": "2020-03-24T12:17:04.474073Z", "sources": [ { "generator": { "name": "artman", - "version": "1.1.1", - "dockerImage": "googleapis/artman@sha256:5ef340c8d9334719bc5c6981d95f4a5d2737b0a6a24f2b9a0d430e96fff85c5b" + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" + } + }, + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/python-spanner.git", + "sha": "1d4976634cb81dd11b0ddc4bfc9fe9c61a7e7041" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "36c0febd0fa7267ab66d14408eec2afd1b6bec4e", - "internalRef": "302639621", - "log": "36c0febd0fa7267ab66d14408eec2afd1b6bec4e\nUpdate GAPIC configurations to v2 .yaml.\n\nPiperOrigin-RevId: 302639621\n\n078f222366ed344509a48f2f084944ef61476613\nFix containeranalysis v1beta1 assembly target name\n\nPiperOrigin-RevId: 302529186\n\n0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6a17abc7652e2fe563e1288c6e8c23fc260dda97" + "sha": "f5e4c17dc78a966dbf29961dd01f9bbd63e20a04" } } ], From 3958f96961b000c7f651268cab83d07635c1c863 Mon Sep 17 00:00:00 2001 From: larkee Date: Wed, 29 Apr 2020 10:56:22 +1000 Subject: [PATCH 2/2] revert synth docstring changes --- .../proto/backup_pb2.py | 54 +- .../proto/common_pb2.py | 2 + .../proto/spanner_database_admin_pb2.py | 120 +++-- .../proto/spanner_instance_admin_pb2.py | 79 ++- google/cloud/spanner_v1/proto/keys_pb2.py | 166 ++++-- google/cloud/spanner_v1/proto/mutation_pb2.py | 19 +- .../cloud/spanner_v1/proto/query_plan_pb2.py | 15 +- .../cloud/spanner_v1/proto/result_set_pb2.py | 23 +- google/cloud/spanner_v1/proto/spanner_pb2.py | 115 ++++- .../cloud/spanner_v1/proto/transaction_pb2.py | 473 +++++++++++------- google/cloud/spanner_v1/proto/type_pb2.py | 10 +- 11 files changed, 718 insertions(+), 358 deletions(-) diff --git a/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py b/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py index 6295d29898..2d13e69a87 100644 --- a/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py +++ b/google/cloud/spanner_admin_database_v1/proto/backup_pb2.py @@ -966,6 +966,8 @@ DESCRIPTOR=_BACKUP, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", __doc__="""A backup of a Cloud Spanner database. + + Attributes: database: Required for the [CreateBackup][google.spanner.admin.database. @@ -1024,8 +1026,10 @@ dict( DESCRIPTOR=_CREATEBACKUPREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for [CreateBackup][google.spanner.admin.database.v1.Databa - seAdmin.CreateBackup]. + __doc__="""The request for + [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. + + Attributes: parent: Required. The name of the instance in which the backup will be @@ -1053,8 +1057,10 @@ dict( DESCRIPTOR=_CREATEBACKUPMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""Metadata type for the operation returned by [CreateBackup][google.span - ner.admin.database.v1.DatabaseAdmin.CreateBackup]. + __doc__="""Metadata type for the operation returned by + [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. + + Attributes: name: The name of the backup being created. @@ -1089,8 +1095,10 @@ dict( DESCRIPTOR=_UPDATEBACKUPREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for [UpdateBackup][google.spanner.admin.database.v1.Databa - seAdmin.UpdateBackup]. + __doc__="""The request for + [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. + + Attributes: backup: Required. The backup to update. ``backup.name``, and the @@ -1118,6 +1126,8 @@ __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", __doc__="""The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup]. + + Attributes: name: Required. Name of the backup. Values are of the form @@ -1134,8 +1144,10 @@ dict( DESCRIPTOR=_DELETEBACKUPREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for [DeleteBackup][google.spanner.admin.database.v1.Databa - seAdmin.DeleteBackup]. + __doc__="""The request for + [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup]. + + Attributes: name: Required. Name of the backup to delete. Values are of the form @@ -1152,8 +1164,10 @@ dict( DESCRIPTOR=_LISTBACKUPSREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for [ListBackups][google.spanner.admin.database.v1.Databas - eAdmin.ListBackups]. + __doc__="""The request for + [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. + + Attributes: parent: Required. The instance to list backups from. Values are of the @@ -1207,8 +1221,10 @@ dict( DESCRIPTOR=_LISTBACKUPSRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The response for [ListBackups][google.spanner.admin.database.v1.Databa - seAdmin.ListBackups]. + __doc__="""The response for + [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. + + Attributes: backups: The list of matching backups. Backups returned are ordered by @@ -1230,8 +1246,10 @@ dict( DESCRIPTOR=_LISTBACKUPOPERATIONSREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The request for [ListBackupOperations][google.spanner.admin.database.v - 1.DatabaseAdmin.ListBackupOperations]. + __doc__="""The request for + [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. + + Attributes: parent: Required. The instance of the backup operations. Values are of @@ -1292,8 +1310,10 @@ dict( DESCRIPTOR=_LISTBACKUPOPERATIONSRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", - __doc__="""The response for [ListBackupOperations][google.spanner.admin.database. - v1.DatabaseAdmin.ListBackupOperations]. + __doc__="""The response for + [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. + + Attributes: operations: The list of matching backup [long-running @@ -1323,6 +1343,8 @@ DESCRIPTOR=_BACKUPINFO, __module__="google.cloud.spanner.admin.database_v1.proto.backup_pb2", __doc__="""Information about a backup. + + Attributes: backup: Name of the backup. diff --git a/google/cloud/spanner_admin_database_v1/proto/common_pb2.py b/google/cloud/spanner_admin_database_v1/proto/common_pb2.py index 33e03762cf..3acf791486 100644 --- a/google/cloud/spanner_admin_database_v1/proto/common_pb2.py +++ b/google/cloud/spanner_admin_database_v1/proto/common_pb2.py @@ -129,6 +129,8 @@ __module__="google.cloud.spanner.admin.database_v1.proto.common_pb2", __doc__="""Encapsulates progress related information for a Cloud Spanner long running operation. + + Attributes: progress_percent: Percent completion of the operation. Values are between 0 and diff --git a/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py b/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py index 922dad5441..125ab3f86b 100644 --- a/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py +++ b/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2.py @@ -1369,6 +1369,8 @@ DESCRIPTOR=_RESTOREINFO, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", __doc__="""Information about the database restore. + + Attributes: source_type: The type of the restore source. @@ -1390,6 +1392,8 @@ DESCRIPTOR=_DATABASE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", __doc__="""A Cloud Spanner database. + + Attributes: name: Required. The name of the database. Values are of the form ``p @@ -1417,8 +1421,10 @@ dict( DESCRIPTOR=_LISTDATABASESREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [ListDatabases][google.spanner.admin.database.v1.Datab - aseAdmin.ListDatabases]. + __doc__="""The request for + [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. + + Attributes: parent: Required. The instance whose databases should be listed. @@ -1444,8 +1450,10 @@ dict( DESCRIPTOR=_LISTDATABASESRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The response for [ListDatabases][google.spanner.admin.database.v1.Data - baseAdmin.ListDatabases]. + __doc__="""The response for + [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. + + Attributes: databases: Databases that matched the request. @@ -1465,8 +1473,10 @@ dict( DESCRIPTOR=_CREATEDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [CreateDatabase][google.spanner.admin.database.v1.Data - baseAdmin.CreateDatabase]. + __doc__="""The request for + [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. + + Attributes: parent: Required. The name of the instance that will serve the new @@ -1497,8 +1507,10 @@ dict( DESCRIPTOR=_CREATEDATABASEMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the operation returned by [CreateDatabase][google.sp - anner.admin.database.v1.DatabaseAdmin.CreateDatabase]. + __doc__="""Metadata type for the operation returned by + [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. + + Attributes: database: The database being created. @@ -1514,8 +1526,10 @@ dict( DESCRIPTOR=_GETDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [GetDatabase][google.spanner.admin.database.v1.Databas - eAdmin.GetDatabase]. + __doc__="""The request for + [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. + + Attributes: name: Required. The name of the requested database. Values are of @@ -1533,20 +1547,24 @@ dict( DESCRIPTOR=_UPDATEDATABASEDDLREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Enqueues the given DDL statements to be applied, in order but not - necessarily all at once, to the database schema at some point (or - points) in the future. The server checks that the statements are + __doc__="""Enqueues the given DDL statements to be applied, in order + but not necessarily all at once, to the database schema at some point + (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before - enqueueing them, but they may still fail upon later execution (e.g., - if a statement from another batch of statements is applied first and - it conflicts in some way, or if there is some data-related problem - like a ``NULL`` value in a column to which ``NOT NULL`` would be - added). If a statement fails, all subsequent statements in the batch - are automatically cancelled. Each batch of statements is assigned a - name which can be used with the - [Operations][google.longrunning.Operations] API to monitor progress. - See the [operation\_id][google.spanner.admin.database.v1.UpdateDatabas - eDdlRequest.operation\_id] field for more details. + enqueueing them, but they may still fail upon later execution (e.g., if + a statement from another batch of statements is applied first and it + conflicts in some way, or if there is some data-related problem like a + ``NULL`` value in a column to which ``NOT NULL`` would be added). If a + statement fails, all subsequent statements in the batch are + automatically cancelled. + + Each batch of statements is assigned a name which can be used with the + [Operations][google.longrunning.Operations] API to monitor progress. See + the + [operation\_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation\_id] + field for more details. + + Attributes: database: Required. The database to update. @@ -1585,8 +1603,10 @@ dict( DESCRIPTOR=_UPDATEDATABASEDDLMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the operation returned by [UpdateDatabaseDdl][google - .spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. + __doc__="""Metadata type for the operation returned by + [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. + + Attributes: database: The database being modified. @@ -1609,8 +1629,10 @@ dict( DESCRIPTOR=_DROPDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [DropDatabase][google.spanner.admin.database.v1.Databa - seAdmin.DropDatabase]. + __doc__="""The request for + [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. + + Attributes: database: Required. The database to be dropped. @@ -1626,8 +1648,10 @@ dict( DESCRIPTOR=_GETDATABASEDDLREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [GetDatabaseDdl][google.spanner.admin.database.v1.Data - baseAdmin.GetDatabaseDdl]. + __doc__="""The request for + [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. + + Attributes: database: Required. The database whose schema we wish to get. @@ -1643,8 +1667,10 @@ dict( DESCRIPTOR=_GETDATABASEDDLRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The response for [GetDatabaseDdl][google.spanner.admin.database.v1.Dat - abaseAdmin.GetDatabaseDdl]. + __doc__="""The response for + [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. + + Attributes: statements: A list of formatted DDL statements defining the schema of the @@ -1661,8 +1687,10 @@ dict( DESCRIPTOR=_LISTDATABASEOPERATIONSREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [ListDatabaseOperations][google.spanner.admin.database - .v1.DatabaseAdmin.ListDatabaseOperations]. + __doc__="""The request for + [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. + + Attributes: parent: Required. The instance of the database operations. Values are @@ -1727,8 +1755,10 @@ dict( DESCRIPTOR=_LISTDATABASEOPERATIONSRESPONSE, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The response for [ListDatabaseOperations][google.spanner.admin.databas - e.v1.DatabaseAdmin.ListDatabaseOperations]. + __doc__="""The response for + [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. + + Attributes: operations: The list of matching database [long-running @@ -1753,8 +1783,10 @@ dict( DESCRIPTOR=_RESTOREDATABASEREQUEST, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""The request for [RestoreDatabase][google.spanner.admin.database.v1.Dat - abaseAdmin.RestoreDatabase]. + __doc__="""The request for + [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. + + Attributes: parent: Required. The name of the instance in which to create the @@ -1786,8 +1818,10 @@ dict( DESCRIPTOR=_RESTOREDATABASEMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the long-running operation returned by [RestoreDatab - ase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. + __doc__="""Metadata type for the long-running operation returned by + [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. + + Attributes: name: Name of the database being created and restored to. @@ -1842,11 +1876,13 @@ dict( DESCRIPTOR=_OPTIMIZERESTOREDDATABASEMETADATA, __module__="google.cloud.spanner.admin.database_v1.proto.spanner_database_admin_pb2", - __doc__="""Metadata type for the long-running operation used to track the - progress of optimizations performed on a newly restored database. This - long-running operation is automatically created by the system after + __doc__="""Metadata type for the long-running operation used to track + the progress of optimizations performed on a newly restored database. + This long-running operation is automatically created by the system after the successful completion of a database restore, and cannot be cancelled. + + Attributes: name: Name of the restored database being optimized. diff --git a/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py b/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py index 1938a6f5c4..f00bfbbe0a 100644 --- a/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py +++ b/google/cloud/spanner_admin_instance_v1/proto/spanner_instance_admin_pb2.py @@ -1304,8 +1304,11 @@ dict( DESCRIPTOR=_INSTANCECONFIG, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""A possible configuration for a Cloud Spanner instance. Configurations - define the geographic placement of nodes and their replication. + __doc__="""A possible configuration for a Cloud Spanner instance. + Configurations define the geographic placement of nodes and their + replication. + + Attributes: name: A unique identifier for the instance configuration. Values are @@ -1337,8 +1340,10 @@ ), DESCRIPTOR=_INSTANCE, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""An isolated set of Cloud Spanner resources on which databases can be - hosted. + __doc__="""An isolated set of Cloud Spanner resources on which + databases can be hosted. + + Attributes: name: Required. A unique identifier for the instance, which cannot @@ -1407,8 +1412,10 @@ dict( DESCRIPTOR=_LISTINSTANCECONFIGSREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [ListInstanceConfigs][google.spanner.admin.instance.v1 - .InstanceAdmin.ListInstanceConfigs]. + __doc__="""The request for + [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. + + Attributes: parent: Required. The name of the project for which a list of @@ -1436,8 +1443,10 @@ dict( DESCRIPTOR=_LISTINSTANCECONFIGSRESPONSE, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The response for [ListInstanceConfigs][google.spanner.admin.instance.v - 1.InstanceAdmin.ListInstanceConfigs]. + __doc__="""The response for + [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. + + Attributes: instance_configs: The list of requested instance configurations. @@ -1458,8 +1467,10 @@ dict( DESCRIPTOR=_GETINSTANCECONFIGREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [GetInstanceConfigRequest][google.spanner.admin.instan - ce.v1.InstanceAdmin.GetInstanceConfig]. + __doc__="""The request for + [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig]. + + Attributes: name: Required. The name of the requested instance configuration. @@ -1477,8 +1488,10 @@ dict( DESCRIPTOR=_GETINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [GetInstance][google.spanner.admin.instance.v1.Instanc - eAdmin.GetInstance]. + __doc__="""The request for + [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance]. + + Attributes: name: Required. The name of the requested instance. Values are of @@ -1501,8 +1514,10 @@ dict( DESCRIPTOR=_CREATEINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [CreateInstance][google.spanner.admin.instance.v1.Inst - anceAdmin.CreateInstance]. + __doc__="""The request for + [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. + + Attributes: parent: Required. The name of the project in which to create the @@ -1526,8 +1541,10 @@ dict( DESCRIPTOR=_LISTINSTANCESREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [ListInstances][google.spanner.admin.instance.v1.Insta - nceAdmin.ListInstances]. + __doc__="""The request for + [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. + + Attributes: parent: Required. The name of the project for which a list of @@ -1567,8 +1584,10 @@ dict( DESCRIPTOR=_LISTINSTANCESRESPONSE, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The response for [ListInstances][google.spanner.admin.instance.v1.Inst - anceAdmin.ListInstances]. + __doc__="""The response for + [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. + + Attributes: instances: The list of requested instances. @@ -1588,8 +1607,10 @@ dict( DESCRIPTOR=_UPDATEINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [UpdateInstance][google.spanner.admin.instance.v1.Inst - anceAdmin.UpdateInstance]. + __doc__="""The request for + [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. + + Attributes: instance: Required. The instance to update, which must always include @@ -1616,8 +1637,10 @@ dict( DESCRIPTOR=_DELETEINSTANCEREQUEST, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""The request for [DeleteInstance][google.spanner.admin.instance.v1.Inst - anceAdmin.DeleteInstance]. + __doc__="""The request for + [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance]. + + Attributes: name: Required. The name of the instance to be deleted. Values are @@ -1634,8 +1657,10 @@ dict( DESCRIPTOR=_CREATEINSTANCEMETADATA, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""Metadata type for the operation returned by [CreateInstance][google.sp - anner.admin.instance.v1.InstanceAdmin.CreateInstance]. + __doc__="""Metadata type for the operation returned by + [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. + + Attributes: instance: The instance being created. @@ -1661,8 +1686,10 @@ dict( DESCRIPTOR=_UPDATEINSTANCEMETADATA, __module__="google.cloud.spanner.admin.instance_v1.proto.spanner_instance_admin_pb2", - __doc__="""Metadata type for the operation returned by [UpdateInstance][google.sp - anner.admin.instance.v1.InstanceAdmin.UpdateInstance]. + __doc__="""Metadata type for the operation returned by + [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. + + Attributes: instance: The desired end state of the update. diff --git a/google/cloud/spanner_v1/proto/keys_pb2.py b/google/cloud/spanner_v1/proto/keys_pb2.py index 15f4b0fad3..9d38124847 100644 --- a/google/cloud/spanner_v1/proto/keys_pb2.py +++ b/google/cloud/spanner_v1/proto/keys_pb2.py @@ -268,47 +268,118 @@ dict( DESCRIPTOR=_KEYRANGE, __module__="google.cloud.spanner_v1.proto.keys_pb2", - __doc__="""KeyRange represents a range of rows in a table or index. A range has - a start key and an end key. These keys can be open or closed, - indicating if the range includes rows with that key. Keys are - represented by lists, where the ith value in the list corresponds to - the ith component of the table or index primary key. Individual values - are encoded as described [here][google.spanner.v1.TypeCode]. For - example, consider the following table definition: :: CREATE - TABLE UserEvents ( UserName STRING(MAX), EventDate - STRING(10) ) PRIMARY KEY(UserName, EventDate); The following keys - name rows in this table: :: ["Bob", "2014-09-23"] ["Alfred", - "2015-06-12"] Since the ``UserEvents`` table's ``PRIMARY KEY`` clause - names two columns, each ``UserEvents`` key has two elements; the first - is the ``UserName``, and the second is the ``EventDate``. Key ranges - with multiple components are interpreted lexicographically by + __doc__="""KeyRange represents a range of rows in a table or index. + + A range has a start key and an end key. These keys can be open or + closed, indicating if the range includes rows with that key. + + Keys are represented by lists, where the ith value in the list + corresponds to the ith component of the table or index primary key. + Individual values are encoded as described + [here][google.spanner.v1.TypeCode]. + + For example, consider the following table definition: + + :: + + CREATE TABLE UserEvents ( + UserName STRING(MAX), + EventDate STRING(10) + ) PRIMARY KEY(UserName, EventDate); + + The following keys name rows in this table: + + :: + + ["Bob", "2014-09-23"] + ["Alfred", "2015-06-12"] + + Since the ``UserEvents`` table's ``PRIMARY KEY`` clause names two + columns, each ``UserEvents`` key has two elements; the first is the + ``UserName``, and the second is the ``EventDate``. + + Key ranges with multiple components are interpreted lexicographically by component using the table or index key's declared sort order. For - example, the following range returns all events for user ``"Bob"`` - that occurred in the year 2015: :: "start_closed": ["Bob", - "2015-01-01"] "end_closed": ["Bob", "2015-12-31"] Start and end - keys can omit trailing key components. This affects the inclusion and - exclusion of rows that exactly match the provided key components: if - the key is closed, then rows that exactly match the provided - components are included; if the key is open, then rows that exactly - match are not included. For example, the following range includes all - events for ``"Bob"`` that occurred during and after the year 2000: :: - "start_closed": ["Bob", "2000-01-01"] "end_closed": ["Bob"] The - next example retrieves all events for ``"Bob"``: :: - "start_closed": ["Bob"] "end_closed": ["Bob"] To retrieve events - before the year 2000: :: "start_closed": ["Bob"] "end_open": - ["Bob", "2000-01-01"] The following range includes all rows in the - table: :: "start_closed": [] "end_closed": [] This range - returns all users whose ``UserName`` begins with any character from A - to C: :: "start_closed": ["A"] "end_open": ["D"] This range - returns all users whose ``UserName`` begins with B: :: - "start_closed": ["B"] "end_open": ["C"] Key ranges honor column - sort order. For example, suppose a table is defined as follows: :: - CREATE TABLE DescendingSortedTable { Key INT64, ... ) - PRIMARY KEY(Key DESC); The following range retrieves all rows with - key values between 1 and 100 inclusive: :: "start_closed": - ["100"] "end_closed": ["1"] Note that 100 is passed as the start, - and 1 is passed as the end, because ``Key`` is a descending column in - the schema. + example, the following range returns all events for user ``"Bob"`` that + occurred in the year 2015: + + :: + + "start_closed": ["Bob", "2015-01-01"] + "end_closed": ["Bob", "2015-12-31"] + + Start and end keys can omit trailing key components. This affects the + inclusion and exclusion of rows that exactly match the provided key + components: if the key is closed, then rows that exactly match the + provided components are included; if the key is open, then rows that + exactly match are not included. + + For example, the following range includes all events for ``"Bob"`` that + occurred during and after the year 2000: + + :: + + "start_closed": ["Bob", "2000-01-01"] + "end_closed": ["Bob"] + + The next example retrieves all events for ``"Bob"``: + + :: + + "start_closed": ["Bob"] + "end_closed": ["Bob"] + + To retrieve events before the year 2000: + + :: + + "start_closed": ["Bob"] + "end_open": ["Bob", "2000-01-01"] + + The following range includes all rows in the table: + + :: + + "start_closed": [] + "end_closed": [] + + This range returns all users whose ``UserName`` begins with any + character from A to C: + + :: + + "start_closed": ["A"] + "end_open": ["D"] + + This range returns all users whose ``UserName`` begins with B: + + :: + + "start_closed": ["B"] + "end_open": ["C"] + + Key ranges honor column sort order. For example, suppose a table is + defined as follows: + + :: + + CREATE TABLE DescendingSortedTable { + Key INT64, + ... + ) PRIMARY KEY(Key DESC); + + The following range retrieves all rows with key values between 1 and 100 + inclusive: + + :: + + "start_closed": ["100"] + "end_closed": ["1"] + + Note that 100 is passed as the start, and 1 is passed as the end, + because ``Key`` is a descending column in the schema. + + Attributes: start_key_type: The start key must be provided. It can be either closed or @@ -341,12 +412,15 @@ dict( DESCRIPTOR=_KEYSET, __module__="google.cloud.spanner_v1.proto.keys_pb2", - __doc__="""\ ``KeySet`` defines a collection of Cloud Spanner keys and/or key - ranges. All the keys are expected to be in the same table or index. - The keys need not be sorted in any particular way. If the same key is - specified multiple times in the set (for example if two ranges, two - keys, or a key and a range overlap), Cloud Spanner behaves as if the - key were only specified once. + __doc__="""\ ``KeySet`` defines a collection of Cloud Spanner keys + and/or key ranges. All the keys are expected to be in the same table or + index. The keys need not be sorted in any particular way. + + If the same key is specified multiple times in the set (for example if + two ranges, two keys, or a key and a range overlap), Cloud Spanner + behaves as if the key were only specified once. + + Attributes: keys: A list of specific keys. Entries in ``keys`` should have diff --git a/google/cloud/spanner_v1/proto/mutation_pb2.py b/google/cloud/spanner_v1/proto/mutation_pb2.py index e330884c2d..b6ad0429b8 100644 --- a/google/cloud/spanner_v1/proto/mutation_pb2.py +++ b/google/cloud/spanner_v1/proto/mutation_pb2.py @@ -338,8 +338,10 @@ __module__="google.cloud.spanner_v1.proto.mutation_pb2", __doc__="""Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], - [insert\_or\_update][google.spanner.v1.Mutation.insert\_or\_update], - and [replace][google.spanner.v1.Mutation.replace] operations. + [insert\_or\_update][google.spanner.v1.Mutation.insert\_or\_update], and + [replace][google.spanner.v1.Mutation.replace] operations. + + Attributes: table: Required. The table whose rows will be written. @@ -371,7 +373,10 @@ dict( DESCRIPTOR=_MUTATION_DELETE, __module__="google.cloud.spanner_v1.proto.mutation_pb2", - __doc__="""Arguments to [delete][google.spanner.v1.Mutation.delete] operations. + __doc__="""Arguments to [delete][google.spanner.v1.Mutation.delete] + operations. + + Attributes: table: Required. The table whose rows will be deleted. @@ -389,9 +394,11 @@ ), DESCRIPTOR=_MUTATION, __module__="google.cloud.spanner_v1.proto.mutation_pb2", - __doc__="""A modification to one or more Cloud Spanner rows. Mutations can be - applied to a Cloud Spanner database by sending them in a - [Commit][google.spanner.v1.Spanner.Commit] call. + __doc__="""A modification to one or more Cloud Spanner rows. + Mutations can be applied to a Cloud Spanner database by sending them in + a [Commit][google.spanner.v1.Spanner.Commit] call. + + Attributes: operation: Required. The operation to perform. diff --git a/google/cloud/spanner_v1/proto/query_plan_pb2.py b/google/cloud/spanner_v1/proto/query_plan_pb2.py index febdab0750..bc715b4549 100644 --- a/google/cloud/spanner_v1/proto/query_plan_pb2.py +++ b/google/cloud/spanner_v1/proto/query_plan_pb2.py @@ -470,8 +470,10 @@ dict( DESCRIPTOR=_PLANNODE_CHILDLINK, __module__="google.cloud.spanner_v1.proto.query_plan_pb2", - __doc__="""Metadata associated with a parent-child relationship appearing in a - [PlanNode][google.spanner.v1.PlanNode]. + __doc__="""Metadata associated with a parent-child relationship + appearing in a [PlanNode][google.spanner.v1.PlanNode]. + + Attributes: child_index: The node to which the link points. @@ -511,6 +513,8 @@ __module__="google.cloud.spanner_v1.proto.query_plan_pb2", __doc__="""Condensed representation of a node and its subtree. Only present for ``SCALAR`` [PlanNode(s)][google.spanner.v1.PlanNode]. + + Attributes: description: A string representation of the expression subtree rooted at @@ -529,6 +533,8 @@ __module__="google.cloud.spanner_v1.proto.query_plan_pb2", __doc__="""Node information for nodes appearing in a [QueryPlan.plan\_nodes][google.spanner.v1.QueryPlan.plan\_nodes]. + + Attributes: index: The ``PlanNode``'s index in [node @@ -574,7 +580,10 @@ dict( DESCRIPTOR=_QUERYPLAN, __module__="google.cloud.spanner_v1.proto.query_plan_pb2", - __doc__="""Contains an ordered list of nodes appearing in the query plan. + __doc__="""Contains an ordered list of nodes appearing in the query + plan. + + Attributes: plan_nodes: The nodes in the query plan. Plan nodes are returned in pre- diff --git a/google/cloud/spanner_v1/proto/result_set_pb2.py b/google/cloud/spanner_v1/proto/result_set_pb2.py index 6890ec1d34..3740450e6b 100644 --- a/google/cloud/spanner_v1/proto/result_set_pb2.py +++ b/google/cloud/spanner_v1/proto/result_set_pb2.py @@ -443,6 +443,8 @@ __module__="google.cloud.spanner_v1.proto.result_set_pb2", __doc__="""Results from [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. + + Attributes: metadata: Metadata about the result set, such as row type information. @@ -476,9 +478,11 @@ dict( DESCRIPTOR=_PARTIALRESULTSET, __module__="google.cloud.spanner_v1.proto.result_set_pb2", - __doc__="""Partial results from a streaming read or SQL query. Streaming reads - and SQL queries better tolerate large result sets, large rows, and - large values, but are a little trickier to consume. + __doc__="""Partial results from a streaming read or SQL query. + Streaming reads and SQL queries better tolerate large result sets, large + rows, and large values, but are a little trickier to consume. + + Attributes: metadata: Metadata about the result set, such as row type information. @@ -560,8 +564,10 @@ dict( DESCRIPTOR=_RESULTSETMETADATA, __module__="google.cloud.spanner_v1.proto.result_set_pb2", - __doc__="""Metadata about a [ResultSet][google.spanner.v1.ResultSet] or - [PartialResultSet][google.spanner.v1.PartialResultSet]. + __doc__="""Metadata about a [ResultSet][google.spanner.v1.ResultSet] + or [PartialResultSet][google.spanner.v1.PartialResultSet]. + + Attributes: row_type: Indicates the field names and types for the rows in the result @@ -585,8 +591,11 @@ dict( DESCRIPTOR=_RESULTSETSTATS, __module__="google.cloud.spanner_v1.proto.result_set_pb2", - __doc__="""Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] - or [PartialResultSet][google.spanner.v1.PartialResultSet]. + __doc__="""Additional statistics about a + [ResultSet][google.spanner.v1.ResultSet] or + [PartialResultSet][google.spanner.v1.PartialResultSet]. + + Attributes: query_plan: [QueryPlan][google.spanner.v1.QueryPlan] for the query diff --git a/google/cloud/spanner_v1/proto/spanner_pb2.py b/google/cloud/spanner_v1/proto/spanner_pb2.py index 4e694921ad..ab1ff4e42e 100644 --- a/google/cloud/spanner_v1/proto/spanner_pb2.py +++ b/google/cloud/spanner_v1/proto/spanner_pb2.py @@ -2332,6 +2332,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [CreateSession][google.spanner.v1.Spanner.CreateSession]. + + Attributes: database: Required. The database in which the new session is created. @@ -2351,6 +2353,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. + + Attributes: database: Required. The database in which the new sessions are created. @@ -2377,6 +2381,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. + + Attributes: session: The freshly created sessions. @@ -2402,6 +2408,8 @@ DESCRIPTOR=_SESSION, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""A session in the Cloud Spanner API. + + Attributes: name: The name of the session. This is always system-assigned; @@ -2435,7 +2443,10 @@ dict( DESCRIPTOR=_GETSESSIONREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for [GetSession][google.spanner.v1.Spanner.GetSession]. + __doc__="""The request for + [GetSession][google.spanner.v1.Spanner.GetSession]. + + Attributes: name: Required. The name of the session to retrieve. @@ -2453,6 +2464,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [ListSessions][google.spanner.v1.Spanner.ListSessions]. + + Attributes: database: Required. The database in which to list sessions. @@ -2486,6 +2499,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The response for [ListSessions][google.spanner.v1.Spanner.ListSessions]. + + Attributes: sessions: The list of requested sessions. @@ -2507,6 +2522,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession]. + + Attributes: name: Required. The name of the session to delete. @@ -2527,6 +2544,8 @@ DESCRIPTOR=_EXECUTESQLREQUEST_QUERYOPTIONS, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""Query optimizer configuration. + + Attributes: optimizer_version: An option to control the selection of optimizer version. This @@ -2558,8 +2577,11 @@ ), DESCRIPTOR=_EXECUTESQLREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and + __doc__="""The request for + [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. + + Attributes: session: Required. The session in which the SQL query should be @@ -2658,6 +2680,8 @@ DESCRIPTOR=_EXECUTEBATCHDMLREQUEST_STATEMENT, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""A single DML statement. + + Attributes: sql: Required. The DML string. @@ -2689,6 +2713,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. + + Attributes: session: Required. The session in which the DML statements should be @@ -2729,27 +2755,38 @@ DESCRIPTOR=_EXECUTEBATCHDMLRESPONSE, __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The response for - [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains - a list of [ResultSet][google.spanner.v1.ResultSet] messages, one for - each DML statement that has successfully executed, in the same order - as the statements in the request. If a statement fails, the status in - the response body identifies the cause of the failure. To check for - DML statements that failed, use the following approach: 1. Check the - status in the response message. The - [google.rpc.Code][google.rpc.Code] enum value ``OK`` indicates that - all statements were executed successfully. 2. If the status was not - ``OK``, check the number of result sets in the response. If the - response contains ``N`` [ResultSet][google.spanner.v1.ResultSet] - messages, then statement ``N+1`` in the request failed. Example 1: - - Request: 5 DML statements, all executed successfully. - Response: - 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the - status ``OK``. Example 2: - Request: 5 DML statements. The third - statement has a syntax error. - Response: 2 - [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax - error (``INVALID_ARGUMENT``) status. The number of - [ResultSet][google.spanner.v1.ResultSet] messages indicates that the - third statement failed, and the fourth and fifth statements were not - executed. + [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a + list of [ResultSet][google.spanner.v1.ResultSet] messages, one for each + DML statement that has successfully executed, in the same order as the + statements in the request. If a statement fails, the status in the + response body identifies the cause of the failure. + + To check for DML statements that failed, use the following approach: + + 1. Check the status in the response message. The + [google.rpc.Code][google.rpc.Code] enum value ``OK`` indicates that + all statements were executed successfully. + 2. If the status was not ``OK``, check the number of result sets in the + response. If the response contains ``N`` + [ResultSet][google.spanner.v1.ResultSet] messages, then statement + ``N+1`` in the request failed. + + Example 1: + + - Request: 5 DML statements, all executed successfully. + - Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with + the status ``OK``. + + Example 2: + + - Request: 5 DML statements. The third statement has a syntax error. + - Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a + syntax error (``INVALID_ARGUMENT``) status. The number of + [ResultSet][google.spanner.v1.ResultSet] messages indicates that the + third statement failed, and the fourth and fifth statements were not + executed. + + Attributes: result_sets: One [ResultSet][google.spanner.v1.ResultSet] for each @@ -2778,7 +2815,10 @@ dict( DESCRIPTOR=_PARTITIONOPTIONS, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""Options for a PartitionQueryRequest and PartitionReadRequest. + __doc__="""Options for a PartitionQueryRequest and + PartitionReadRequest. + + Attributes: partition_size_bytes: \ **Note:** This hint is currently ignored by PartitionQuery @@ -2817,6 +2857,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] + + Attributes: session: Required. The session used to create the partitions. @@ -2873,6 +2915,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead] + + Attributes: session: Required. The session used to create the partitions. @@ -2926,6 +2970,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""Information returned for each partition returned in a PartitionResponse. + + Attributes: partition_token: This token can be passed to Read, StreamingRead, ExecuteSql, @@ -2946,6 +2992,8 @@ __doc__="""The response for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] or [PartitionRead][google.spanner.v1.Spanner.PartitionRead] + + Attributes: partitions: Partitions created by this request. @@ -2965,6 +3013,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. + + Attributes: session: Required. The session in which the read should be performed. @@ -3037,6 +3087,8 @@ __module__="google.cloud.spanner_v1.proto.spanner_pb2", __doc__="""The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. + + Attributes: session: Required. The session in which the transaction runs. @@ -3054,7 +3106,10 @@ dict( DESCRIPTOR=_COMMITREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for [Commit][google.spanner.v1.Spanner.Commit]. + __doc__="""The request for + [Commit][google.spanner.v1.Spanner.Commit]. + + Attributes: session: Required. The session in which the transaction to be committed @@ -3089,7 +3144,10 @@ dict( DESCRIPTOR=_COMMITRESPONSE, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The response for [Commit][google.spanner.v1.Spanner.Commit]. + __doc__="""The response for + [Commit][google.spanner.v1.Spanner.Commit]. + + Attributes: commit_timestamp: The Cloud Spanner timestamp at which the transaction @@ -3106,7 +3164,10 @@ dict( DESCRIPTOR=_ROLLBACKREQUEST, __module__="google.cloud.spanner_v1.proto.spanner_pb2", - __doc__="""The request for [Rollback][google.spanner.v1.Spanner.Rollback]. + __doc__="""The request for + [Rollback][google.spanner.v1.Spanner.Rollback]. + + Attributes: session: Required. The session in which the transaction to roll back is diff --git a/google/cloud/spanner_v1/proto/transaction_pb2.py b/google/cloud/spanner_v1/proto/transaction_pb2.py index 24f6a3fa7a..aa83e3373c 100644 --- a/google/cloud/spanner_v1/proto/transaction_pb2.py +++ b/google/cloud/spanner_v1/proto/transaction_pb2.py @@ -548,8 +548,10 @@ dict( DESCRIPTOR=_TRANSACTIONOPTIONS_READWRITE, __module__="google.cloud.spanner_v1.proto.transaction_pb2", - __doc__="""Message type to initiate a read-write transaction. Currently this - transaction type has no options.""", + __doc__="""Message type to initiate a read-write transaction. + Currently this transaction type has no options. + + """, # @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions.ReadWrite) ), ), @@ -559,7 +561,9 @@ dict( DESCRIPTOR=_TRANSACTIONOPTIONS_PARTITIONEDDML, __module__="google.cloud.spanner_v1.proto.transaction_pb2", - __doc__="""Message type to initiate a Partitioned DML transaction.""", + __doc__="""Message type to initiate a Partitioned DML transaction. + + """, # @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions.PartitionedDml) ), ), @@ -570,6 +574,8 @@ DESCRIPTOR=_TRANSACTIONOPTIONS_READONLY, __module__="google.cloud.spanner_v1.proto.transaction_pb2", __doc__="""Message type to initiate a read-only transaction. + + Attributes: timestamp_bound: How to choose the timestamp for the read-only transaction. @@ -626,34 +632,50 @@ ), DESCRIPTOR=_TRANSACTIONOPTIONS, __module__="google.cloud.spanner_v1.proto.transaction_pb2", - __doc__="""# Transactions Each session can have at most one active transaction - at a time. After the active transaction is completed, the session can - immediately be re-used for the next transaction. It is not necessary - to create a new session for each transaction. Transaction Modes - Cloud Spanner supports three transaction modes: 1. - Locking read-write. This type of transaction is the only way to write - data into Cloud Spanner. These transactions rely on pessimistic - locking and, if necessary, two-phase commit. Locking read-write - transactions may abort, requiring the application to retry. 2. - Snapshot read-only. This transaction type provides guaranteed - consistency across several reads, but does not allow writes. Snapshot - read-only transactions can be configured to read at timestamps in the - past. Snapshot read-only transactions do not need to be committed. 3. - Partitioned DML. This type of transaction is used to execute a single - Partitioned DML statement. Partitioned DML partitions the key space - and runs the DML statement over each partition in parallel using - separate, internal transactions that commit independently. - Partitioned DML transactions do not need to be committed. For - transactions that only read, snapshot read-only transactions provide - simpler semantics and are almost always faster. In particular, read- - only transactions do not take locks, so they do not conflict with - read-write transactions. As a consequence of not taking locks, they - also do not abort, so retry loops are not needed. Transactions may - only read/write data in a single database. They may, however, - read/write data in different tables within that database. Locking - Read-Write Transactions Locking - transactions may be used to atomically read-modify-write data anywhere - in a database. This type of transaction is externally consistent. + __doc__="""# Transactions + + Each session can have at most one active transaction at a time. After + the active transaction is completed, the session can immediately be + re-used for the next transaction. It is not necessary to create a new + session for each transaction. + + Transaction Modes + + + Cloud Spanner supports three transaction modes: + + 1. Locking read-write. This type of transaction is the only way to write + data into Cloud Spanner. These transactions rely on pessimistic + locking and, if necessary, two-phase commit. Locking read-write + transactions may abort, requiring the application to retry. + + 2. Snapshot read-only. This transaction type provides guaranteed + consistency across several reads, but does not allow writes. Snapshot + read-only transactions can be configured to read at timestamps in the + past. Snapshot read-only transactions do not need to be committed. + + 3. Partitioned DML. This type of transaction is used to execute a single + Partitioned DML statement. Partitioned DML partitions the key space + and runs the DML statement over each partition in parallel using + separate, internal transactions that commit independently. + Partitioned DML transactions do not need to be committed. + + For transactions that only read, snapshot read-only transactions provide + simpler semantics and are almost always faster. In particular, read-only + transactions do not take locks, so they do not conflict with read-write + transactions. As a consequence of not taking locks, they also do not + abort, so retry loops are not needed. + + Transactions may only read/write data in a single database. They may, + however, read/write data in different tables within that database. + + Locking Read-Write Transactions + + + Locking transactions may be used to atomically read-modify-write data + anywhere in a database. This type of transaction is externally + consistent. + Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as @@ -661,162 +683,242 @@ not been terminated by [Commit][google.spanner.v1.Spanner.Commit] or [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of inactivity at the client may cause Cloud Spanner to release a - transaction's locks and abort it. Conceptually, a read-write - transaction consists of zero or more reads or SQL statements followed - by [Commit][google.spanner.v1.Spanner.Commit]. At any time before - [Commit][google.spanner.v1.Spanner.Commit], the client can send a - [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the - transaction. Semantics Cloud Spanner can commit the - transaction if all read locks it acquired are still valid at commit - time, and it is able to acquire write locks for all writes. Cloud - Spanner can abort the transaction for any reason. If a commit attempt - returns ``ABORTED``, Cloud Spanner guarantees that the transaction has - not modified any user data in Cloud Spanner. Unless the transaction - commits, Cloud Spanner makes no guarantees about how long the - transaction's locks were held for. It is an error to use Cloud Spanner - locks for any sort of mutual exclusion other than between Cloud - Spanner transactions themselves. Retrying Aborted Transactions - When a transaction aborts, the - application can choose to retry the whole transaction again. To - maximize the chances of successfully committing the retry, the client - should execute the retry in the same session as the original attempt. - The original session's lock priority increases with each consecutive - abort, meaning that each attempt has a slightly better chance of - success than the previous. Under some circumstances (e.g., many - transactions attempting to modify the same row(s)), a transaction can - abort many times in a short period before successfully committing. - Thus, it is not a good idea to cap the number of retries a transaction - can attempt; instead, it is better to limit the total amount of wall - time spent retrying. Idle Transactions A - transaction is considered idle if it has no outstanding reads or SQL + transaction's locks and abort it. + + Conceptually, a read-write transaction consists of zero or more reads or + SQL statements followed by [Commit][google.spanner.v1.Spanner.Commit]. + At any time before [Commit][google.spanner.v1.Spanner.Commit], the + client can send a [Rollback][google.spanner.v1.Spanner.Rollback] request + to abort the transaction. + + Semantics + + + Cloud Spanner can commit the transaction if all read locks it acquired + are still valid at commit time, and it is able to acquire write locks + for all writes. Cloud Spanner can abort the transaction for any reason. + If a commit attempt returns ``ABORTED``, Cloud Spanner guarantees that + the transaction has not modified any user data in Cloud Spanner. + + Unless the transaction commits, Cloud Spanner makes no guarantees about + how long the transaction's locks were held for. It is an error to use + Cloud Spanner locks for any sort of mutual exclusion other than between + Cloud Spanner transactions themselves. + + Retrying Aborted Transactions + + + When a transaction aborts, the application can choose to retry the whole + transaction again. To maximize the chances of successfully committing + the retry, the client should execute the retry in the same session as + the original attempt. The original session's lock priority increases + with each consecutive abort, meaning that each attempt has a slightly + better chance of success than the previous. + + Under some circumstances (e.g., many transactions attempting to modify + the same row(s)), a transaction can abort many times in a short period + before successfully committing. Thus, it is not a good idea to cap the + number of retries a transaction can attempt; instead, it is better to + limit the total amount of wall time spent retrying. + + Idle Transactions + + + A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 - seconds. Idle transactions can be aborted by Cloud Spanner so that - they don't hold on to locks indefinitely. In that case, the commit - will fail with error ``ABORTED``. If this behavior is undesirable, - periodically executing a simple SQL query in the transaction (e.g., - ``SELECT 1``) prevents the transaction from becoming idle. Snapshot - Read-Only Transactions Snapshot read- - only transactions provides a simpler method than locking read-write - transactions for doing several consistent reads. However, this type of - transaction does not support writes. Snapshot transactions do not - take locks. Instead, they work by choosing a Cloud Spanner timestamp, - then executing all reads at that timestamp. Since they do not acquire - locks, they do not block concurrent read-write transactions. Unlike - locking read-write transactions, snapshot read-only transactions never - abort. They can fail if the chosen read timestamp is garbage + seconds. Idle transactions can be aborted by Cloud Spanner so that they + don't hold on to locks indefinitely. In that case, the commit will fail + with error ``ABORTED``. + + If this behavior is undesirable, periodically executing a simple SQL + query in the transaction (e.g., ``SELECT 1``) prevents the transaction + from becoming idle. + + Snapshot Read-Only Transactions + + + Snapshot read-only transactions provides a simpler method than locking + read-write transactions for doing several consistent reads. However, + this type of transaction does not support writes. + + Snapshot transactions do not take locks. Instead, they work by choosing + a Cloud Spanner timestamp, then executing all reads at that timestamp. + Since they do not acquire locks, they do not block concurrent read-write + transactions. + + Unlike locking read-write transactions, snapshot read-only transactions + never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in - practice. Snapshot read-only transactions do not need to call + practice. + + Snapshot read-only transactions do not need to call [Commit][google.spanner.v1.Spanner.Commit] or [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not - permitted to do so). To execute a snapshot transaction, the client - specifies a timestamp bound, which tells Cloud Spanner how to choose a - read timestamp. The types of timestamp bound are: - Strong (the - default). - Bounded staleness. - Exact staleness. If the Cloud - Spanner database to be read is geographically distributed, stale read- - only transactions can execute more quickly than strong or read-write - transaction, because they are able to execute far from the leader - replica. Each type of timestamp bound is discussed in detail below. - Strong Strong reads are guaranteed to see the effects of all - transactions that have committed before the start of the read. - Furthermore, all rows yielded by a single read are consistent with - each other -- if any part of the read observes a transaction, all - parts of the read see the transaction. Strong reads are not - repeatable: two consecutive strong read-only transactions might return - inconsistent results if there are concurrent writes. If consistency - across reads is required, the reads should be executed within a - transaction or at an exact read timestamp. See [TransactionOptions.Re - adOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. - Exact Staleness These timestamp bounds execute reads - at a user-specified timestamp. Reads at a timestamp are guaranteed to - see a consistent prefix of the global transaction history: they - observe modifications done by all transactions with a commit timestamp - <= the read timestamp, and observe none of the modifications done by - transactions with a larger commit timestamp. They will block until all - conflicting transactions that may be assigned commit timestamps <= the - read timestamp have finished. The timestamp can either be expressed - as an absolute Cloud Spanner commit timestamp or a staleness relative - to the current time. These modes do not require a "negotiation phase" - to pick a timestamp. As a result, they execute slightly faster than - the equivalent boundedly stale concurrency modes. On the other hand, - boundedly stale reads usually return fresher results. See [Transactio - nOptions.ReadOnly.read\_timestamp][google.spanner.v1.TransactionOption - s.ReadOnly.read\_timestamp] and [TransactionOptions.ReadOnly.exact\_st - aleness][google.spanner.v1.TransactionOptions.ReadOnly.exact\_stalenes - s]. Bounded Staleness Bounded staleness modes - allow Cloud Spanner to pick the read timestamp, subject to a user- - provided staleness bound. Cloud Spanner chooses the newest timestamp - within the staleness bound that allows execution of the reads at the - closest available replica without blocking. All rows yielded are - consistent with each other -- if any part of the read observes a - transaction, all parts of the read see the transaction. Boundedly - stale reads are not repeatable: two stale reads, even if they use the - same staleness bound, can execute at different timestamps and thus - return inconsistent results. Boundedly stale reads execute in two - phases: the first phase negotiates a timestamp among all replicas - needed to serve the read. In the second phase, reads are executed at - the negotiated timestamp. As a result of the two phase execution, - bounded staleness reads are usually a little slower than comparable - exact staleness reads. However, they are typically able to return - fresher results, and are more likely to execute at the closest - replica. Because the timestamp negotiation requires up-front - knowledge of which rows will be read, it can only be used with single- - use read-only transactions. See [TransactionOptions.ReadOnly.max\_sta - leness][google.spanner.v1.TransactionOptions.ReadOnly.max\_staleness] - and [TransactionOptions.ReadOnly.min\_read\_timestamp][google.spanner. - v1.TransactionOptions.ReadOnly.min\_read\_timestamp]. Old Read - Timestamps and Garbage Collection - Cloud Spanner continuously - garbage collects deleted and overwritten data in the background to - reclaim storage space. This process is known as "version GC". By - default, version GC reclaims versions after they are one hour old. - Because of this, Cloud Spanner cannot perform reads at read timestamps - more than one hour in the past. This restriction also applies to in- - progress reads and/or SQL queries whose timestamp become too old while - executing. Reads and SQL queries with too-old read timestamps fail - with the error ``FAILED_PRECONDITION``. Partitioned DML Transactions - Partitioned DML transactions are used to - execute DML statements with a different execution strategy that - provides different, and often better, scalability properties for - large, table-wide operations than DML in a ReadWrite transaction. - Smaller scoped statements, such as an OLTP workload, should prefer - using ReadWrite transactions. Partitioned DML partitions the keyspace - and runs the DML statement on each partition in separate, internal - transactions. These transactions commit automatically when complete, - and run independently from one another. To reduce lock contention, - this execution strategy only acquires read locks on rows that match - the WHERE clause of the statement. Additionally, the smaller per- - partition transactions hold locks for less time. That said, - Partitioned DML is not a drop-in replacement for standard DML used in - ReadWrite transactions. - The DML statement must be fully- - partitionable. Specifically, the statement must be expressible as - the union of many statements which each access only a single row of - the table. - The statement is not applied atomically to all rows of - the table. Rather, the statement is applied atomically to - partitions of the table, in independent transactions. Secondary - index rows are updated atomically with the base table rows. - - Partitioned DML does not guarantee exactly-once execution semantics - against a partition. The statement will be applied at least once to - each partition. It is strongly recommended that the DML statement - should be idempotent to avoid unexpected results. For instance, it is - potentially dangerous to run a statement such as ``UPDATE table SET - column = column + 1`` as it could be run multiple times against - some rows. - The partitions are committed automatically - there is - no support for Commit or Rollback. If the call returns an error, or - if the client issuing the ExecuteSql call dies, it is possible that - some rows had the statement executed on them successfully. It is - also possible that statement was never executed against other rows. + permitted to do so). + + To execute a snapshot transaction, the client specifies a timestamp + bound, which tells Cloud Spanner how to choose a read timestamp. + + The types of timestamp bound are: + + - Strong (the default). + - Bounded staleness. + - Exact staleness. + + If the Cloud Spanner database to be read is geographically distributed, + stale read-only transactions can execute more quickly than strong or + read-write transaction, because they are able to execute far from the + leader replica. + + Each type of timestamp bound is discussed in detail below. + + Strong + + + Strong reads are guaranteed to see the effects of all transactions that + have committed before the start of the read. Furthermore, all rows + yielded by a single read are consistent with each other -- if any part + of the read observes a transaction, all parts of the read see the + transaction. + + Strong reads are not repeatable: two consecutive strong read-only + transactions might return inconsistent results if there are concurrent + writes. If consistency across reads is required, the reads should be + executed within a transaction or at an exact read timestamp. + + See + [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. + + Exact Staleness + + + These timestamp bounds execute reads at a user-specified timestamp. + Reads at a timestamp are guaranteed to see a consistent prefix of the + global transaction history: they observe modifications done by all + transactions with a commit timestamp <= the read timestamp, and observe + none of the modifications done by transactions with a larger commit + timestamp. They will block until all conflicting transactions that may + be assigned commit timestamps <= the read timestamp have finished. + + The timestamp can either be expressed as an absolute Cloud Spanner + commit timestamp or a staleness relative to the current time. + + These modes do not require a "negotiation phase" to pick a timestamp. As + a result, they execute slightly faster than the equivalent boundedly + stale concurrency modes. On the other hand, boundedly stale reads + usually return fresher results. + + See + [TransactionOptions.ReadOnly.read\_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read\_timestamp] + and + [TransactionOptions.ReadOnly.exact\_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact\_staleness]. + + Bounded Staleness + + + Bounded staleness modes allow Cloud Spanner to pick the read timestamp, + subject to a user-provided staleness bound. Cloud Spanner chooses the + newest timestamp within the staleness bound that allows execution of the + reads at the closest available replica without blocking. + + All rows yielded are consistent with each other -- if any part of the + read observes a transaction, all parts of the read see the transaction. + Boundedly stale reads are not repeatable: two stale reads, even if they + use the same staleness bound, can execute at different timestamps and + thus return inconsistent results. + + Boundedly stale reads execute in two phases: the first phase negotiates + a timestamp among all replicas needed to serve the read. In the second + phase, reads are executed at the negotiated timestamp. + + As a result of the two phase execution, bounded staleness reads are + usually a little slower than comparable exact staleness reads. However, + they are typically able to return fresher results, and are more likely + to execute at the closest replica. + + Because the timestamp negotiation requires up-front knowledge of which + rows will be read, it can only be used with single-use read-only + transactions. + + See + [TransactionOptions.ReadOnly.max\_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max\_staleness] + and + [TransactionOptions.ReadOnly.min\_read\_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min\_read\_timestamp]. + + Old Read Timestamps and Garbage Collection + + + Cloud Spanner continuously garbage collects deleted and overwritten data + in the background to reclaim storage space. This process is known as + "version GC". By default, version GC reclaims versions after they are + one hour old. Because of this, Cloud Spanner cannot perform reads at + read timestamps more than one hour in the past. This restriction also + applies to in-progress reads and/or SQL queries whose timestamp become + too old while executing. Reads and SQL queries with too-old read + timestamps fail with the error ``FAILED_PRECONDITION``. + + Partitioned DML Transactions + + + Partitioned DML transactions are used to execute DML statements with a + different execution strategy that provides different, and often better, + scalability properties for large, table-wide operations than DML in a + ReadWrite transaction. Smaller scoped statements, such as an OLTP + workload, should prefer using ReadWrite transactions. + + Partitioned DML partitions the keyspace and runs the DML statement on + each partition in separate, internal transactions. These transactions + commit automatically when complete, and run independently from one + another. + + To reduce lock contention, this execution strategy only acquires read + locks on rows that match the WHERE clause of the statement. + Additionally, the smaller per-partition transactions hold locks for less + time. + + That said, Partitioned DML is not a drop-in replacement for standard DML + used in ReadWrite transactions. + + - The DML statement must be fully-partitionable. Specifically, the + statement must be expressible as the union of many statements which + each access only a single row of the table. + + - The statement is not applied atomically to all rows of the table. + Rather, the statement is applied atomically to partitions of the + table, in independent transactions. Secondary index rows are updated + atomically with the base table rows. + + - Partitioned DML does not guarantee exactly-once execution semantics + against a partition. The statement will be applied at least once to + each partition. It is strongly recommended that the DML statement + should be idempotent to avoid unexpected results. For instance, it is + potentially dangerous to run a statement such as + ``UPDATE table SET column = column + 1`` as it could be run multiple + times against some rows. + + - The partitions are committed automatically - there is no support for + Commit or Rollback. If the call returns an error, or if the client + issuing the ExecuteSql call dies, it is possible that some rows had + the statement executed on them successfully. It is also possible that + statement was never executed against other rows. + - Partitioned DML transactions may only contain the execution of a - single DML statement via ExecuteSql or ExecuteStreamingSql. - If any - error is encountered during the execution of the partitioned DML - operation (for instance, a UNIQUE INDEX violation, division by - zero, or a value that cannot be stored due to schema constraints), - then the operation is stopped at that point and an error is returned. - It is possible that at this point, some partitions have been - committed (or even committed multiple times), and other partitions - have not been run at all. Given the above, Partitioned DML is good - fit for large, database-wide, operations that are idempotent, such as - deleting old rows from a very large table. + single DML statement via ExecuteSql or ExecuteStreamingSql. + + - If any error is encountered during the execution of the partitioned + DML operation (for instance, a UNIQUE INDEX violation, division by + zero, or a value that cannot be stored due to schema constraints), + then the operation is stopped at that point and an error is returned. + It is possible that at this point, some partitions have been + committed (or even committed multiple times), and other partitions + have not been run at all. + + Given the above, Partitioned DML is good fit for large, database-wide, + operations that are idempotent, such as deleting old rows from a very + large table. + + Attributes: mode: Required. The type of transaction. @@ -851,6 +953,8 @@ DESCRIPTOR=_TRANSACTION, __module__="google.cloud.spanner_v1.proto.transaction_pb2", __doc__="""A transaction. + + Attributes: id: \ ``id`` may be used to identify the transaction in subsequent @@ -881,9 +985,12 @@ __module__="google.cloud.spanner_v1.proto.transaction_pb2", __doc__="""This message is used to select the transaction in which a [Read][google.spanner.v1.Spanner.Read] or - [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. See - [TransactionOptions][google.spanner.v1.TransactionOptions] for more + [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. + + See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions. + + Attributes: selector: If no fields are set, the default is a single use transaction diff --git a/google/cloud/spanner_v1/proto/type_pb2.py b/google/cloud/spanner_v1/proto/type_pb2.py index 3b287cd392..2ef35b36c6 100644 --- a/google/cloud/spanner_v1/proto/type_pb2.py +++ b/google/cloud/spanner_v1/proto/type_pb2.py @@ -279,8 +279,10 @@ dict( DESCRIPTOR=_TYPE, __module__="google.cloud.spanner_v1.proto.type_pb2", - __doc__="""\ ``Type`` indicates the type of a Cloud Spanner value, as might be - stored in a table cell or returned from an SQL query. + __doc__="""\ ``Type`` indicates the type of a Cloud Spanner value, as + might be stored in a table cell or returned from an SQL query. + + Attributes: code: Required. The [TypeCode][google.spanner.v1.TypeCode] for this @@ -311,6 +313,8 @@ DESCRIPTOR=_STRUCTTYPE_FIELD, __module__="google.cloud.spanner_v1.proto.type_pb2", __doc__="""Message representing a single field of a struct. + + Attributes: name: The name of the field. For reads, this is the column name. For @@ -330,6 +334,8 @@ __module__="google.cloud.spanner_v1.proto.type_pb2", __doc__="""\ ``StructType`` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. + + Attributes: fields: The list of fields that make up this struct. Order is