@google-cloud/spanner 7.14.0 → 7.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +14 -2
- package/build/protos/google/spanner/admin/instance/v1/common.proto +7 -0
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +139 -16
- package/build/protos/google/spanner/v1/commit_response.proto +9 -0
- package/build/protos/google/spanner/v1/result_set.proto +21 -0
- package/build/protos/google/spanner/v1/spanner.proto +39 -2
- package/build/protos/google/spanner/v1/transaction.proto +34 -0
- package/build/protos/google/spanner/v1/type.proto +43 -30
- package/build/protos/protos.d.ts +1908 -1452
- package/build/protos/protos.js +5095 -3724
- package/build/protos/protos.json +310 -129
- package/build/src/batch-transaction.d.ts +1 -0
- package/build/src/batch-transaction.js +90 -50
- package/build/src/database.d.ts +6 -2
- package/build/src/database.js +433 -235
- package/build/src/index.d.ts +5 -0
- package/build/src/index.js +4 -0
- package/build/src/instance.d.ts +2 -0
- package/build/src/instance.js +6 -1
- package/build/src/instrument.d.ts +84 -0
- package/build/src/instrument.js +212 -0
- package/build/src/session-pool.d.ts +2 -0
- package/build/src/session-pool.js +61 -23
- package/build/src/session.js +1 -7
- package/build/src/table.d.ts +3 -0
- package/build/src/table.js +34 -14
- package/build/src/transaction.d.ts +3 -0
- package/build/src/transaction.js +411 -194
- package/build/src/v1/spanner_client.d.ts +14 -0
- package/package.json +12 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [7.16.0](https://github.com/googleapis/nodejs-spanner/compare/v7.15.0...v7.16.0) (2024-11-09)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **spanner:** Add support for Cloud Spanner Default Backup Schedules ([#2135](https://github.com/googleapis/nodejs-spanner/issues/2135)) ([19f137c](https://github.com/googleapis/nodejs-spanner/commit/19f137c870796d60902be8d9d3a82f4abcfc693f))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **deps:** Update dependency google-gax to v4.4.1 ([#2100](https://github.com/googleapis/nodejs-spanner/issues/2100)) ([2e94bcd](https://github.com/googleapis/nodejs-spanner/commit/2e94bcd06d99a98c7767281e8035d000e186692b))
|
|
18
|
+
|
|
19
|
+
## [7.15.0](https://github.com/googleapis/nodejs-spanner/compare/v7.14.0...v7.15.0) (2024-10-30)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* (observability, samples): add tracing end-to-end sample ([#2130](https://github.com/googleapis/nodejs-spanner/issues/2130)) ([66d99e8](https://github.com/googleapis/nodejs-spanner/commit/66d99e836cd2bfbb3b0f78980ec2b499f9e5e563))
|
|
25
|
+
* (observability) add spans for BatchTransaction and Table ([#2115](https://github.com/googleapis/nodejs-spanner/issues/2115)) ([d51aae9](https://github.com/googleapis/nodejs-spanner/commit/d51aae9c9c3c0e6319d81c2809573ae54675acf3)), closes [#2114](https://github.com/googleapis/nodejs-spanner/issues/2114)
|
|
26
|
+
* (observability) Add support for OpenTelemetry traces and allow observability options to be passed. ([#2131](https://github.com/googleapis/nodejs-spanner/issues/2131)) ([5237e11](https://github.com/googleapis/nodejs-spanner/commit/5237e118befb4b7fe4aea76a80a91e822d7a22e4)), closes [#2079](https://github.com/googleapis/nodejs-spanner/issues/2079)
|
|
27
|
+
* (observability) propagate database name for every span generated to aid in quick debugging ([#2155](https://github.com/googleapis/nodejs-spanner/issues/2155)) ([0342e74](https://github.com/googleapis/nodejs-spanner/commit/0342e74721a0684d8195a6299c3a634eefc2b522))
|
|
28
|
+
* (observability) trace Database.batchCreateSessions + SessionPool.createSessions ([#2145](https://github.com/googleapis/nodejs-spanner/issues/2145)) ([f489c94](https://github.com/googleapis/nodejs-spanner/commit/f489c9479fa5402f0c960cf896fd3be0e946f182))
|
|
29
|
+
* (observability): trace Database.runPartitionedUpdate ([#2176](https://github.com/googleapis/nodejs-spanner/issues/2176)) ([701e226](https://github.com/googleapis/nodejs-spanner/commit/701e22660d5ac9f0b3e940ad656b9ca6c479251d)), closes [#2079](https://github.com/googleapis/nodejs-spanner/issues/2079)
|
|
30
|
+
* (observability): trace Database.runTransactionAsync ([#2167](https://github.com/googleapis/nodejs-spanner/issues/2167)) ([d0fe178](https://github.com/googleapis/nodejs-spanner/commit/d0fe178623c1c48245d11bcea97fcd340b6615af)), closes [#207](https://github.com/googleapis/nodejs-spanner/issues/207)
|
|
31
|
+
* Allow multiple KMS keys to create CMEK database/backup ([#2099](https://github.com/googleapis/nodejs-spanner/issues/2099)) ([51bc8a7](https://github.com/googleapis/nodejs-spanner/commit/51bc8a7445ab8b3d2239493b69d9c271c1086dde))
|
|
32
|
+
* **observability:** Fix bugs found from product review + negative cases ([#2158](https://github.com/googleapis/nodejs-spanner/issues/2158)) ([cbc86fa](https://github.com/googleapis/nodejs-spanner/commit/cbc86fa80498af6bd745eebb9443612936e26d4e))
|
|
33
|
+
* **observability:** Trace Database methods ([#2119](https://github.com/googleapis/nodejs-spanner/issues/2119)) ([1f06871](https://github.com/googleapis/nodejs-spanner/commit/1f06871f7aca386756e8691013602b069697bb87)), closes [#2114](https://github.com/googleapis/nodejs-spanner/issues/2114)
|
|
34
|
+
* **observability:** Trace Database.batchWriteAtLeastOnce ([#2157](https://github.com/googleapis/nodejs-spanner/issues/2157)) ([2a19ef1](https://github.com/googleapis/nodejs-spanner/commit/2a19ef1af4f6fd1b81d08afc15db76007859a0b9)), closes [#2079](https://github.com/googleapis/nodejs-spanner/issues/2079)
|
|
35
|
+
* **observability:** Trace Transaction ([#2122](https://github.com/googleapis/nodejs-spanner/issues/2122)) ([a464bdb](https://github.com/googleapis/nodejs-spanner/commit/a464bdb5cbb7856b7a08dac3ff48132948b65792)), closes [#2114](https://github.com/googleapis/nodejs-spanner/issues/2114)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* Exact staleness timebound ([#2143](https://github.com/googleapis/nodejs-spanner/issues/2143)) ([f01516e](https://github.com/googleapis/nodejs-spanner/commit/f01516ec6ba44730622cfb050c52cd93f30bba7a)), closes [#2129](https://github.com/googleapis/nodejs-spanner/issues/2129)
|
|
41
|
+
* GetMetadata for Session ([#2124](https://github.com/googleapis/nodejs-spanner/issues/2124)) ([2fd63ac](https://github.com/googleapis/nodejs-spanner/commit/2fd63acb87ce06a02d7fdfa78d836dbd7ad59a26)), closes [#2123](https://github.com/googleapis/nodejs-spanner/issues/2123)
|
|
42
|
+
|
|
7
43
|
## [7.14.0](https://github.com/googleapis/nodejs-spanner/compare/v7.13.0...v7.14.0) (2024-08-14)
|
|
8
44
|
|
|
9
45
|
|
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
46
46
|
1. [Select or create a Cloud Platform project][projects].
|
|
47
47
|
1. [Enable billing for your project][billing].
|
|
48
48
|
1. [Enable the Cloud Spanner API][enable_api].
|
|
49
|
-
1. [Set up authentication
|
|
49
|
+
1. [Set up authentication][auth] so you can access the
|
|
50
50
|
API from your local workstation.
|
|
51
51
|
|
|
52
52
|
### Installing the client library
|
|
@@ -91,34 +91,42 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
|
|
|
91
91
|
| --------------------------- | --------------------------------- | ------ |
|
|
92
92
|
| Add and drop new database role | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/add-and-drop-new-database-role.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/add-and-drop-new-database-role.js,samples/README.md) |
|
|
93
93
|
| Backups-cancel | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-cancel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-cancel.js,samples/README.md) |
|
|
94
|
+
| Copies a source backup | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-copy-with-multiple-kms-keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-copy-with-multiple-kms-keys.js,samples/README.md) |
|
|
94
95
|
| Copies a source backup | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-copy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-copy.js,samples/README.md) |
|
|
95
96
|
| Backups-create-with-encryption-key | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-create-with-encryption-key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-create-with-encryption-key.js,samples/README.md) |
|
|
97
|
+
| Backups-create-with-multiple-kms-keys | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-create-with-multiple-kms-keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-create-with-multiple-kms-keys.js,samples/README.md) |
|
|
96
98
|
| Backups-create | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-create.js,samples/README.md) |
|
|
97
99
|
| Backups-delete | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-delete.js,samples/README.md) |
|
|
98
100
|
| Backups-get-database-operations | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-get-database-operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-get-database-operations.js,samples/README.md) |
|
|
99
101
|
| Backups-get-operations | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-get-operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-get-operations.js,samples/README.md) |
|
|
100
102
|
| Backups-get | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-get.js,samples/README.md) |
|
|
101
103
|
| Backups-restore-with-encryption-key | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-restore-with-encryption-key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-restore-with-encryption-key.js,samples/README.md) |
|
|
104
|
+
| Backups-restore-with-multiple-kms-keys | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-restore-with-multiple-kms-keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-restore-with-multiple-kms-keys.js,samples/README.md) |
|
|
102
105
|
| Backups-restore | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-restore.js,samples/README.md) |
|
|
103
106
|
| Backups-update | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups-update.js,samples/README.md) |
|
|
104
107
|
| Backups | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/backups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/backups.js,samples/README.md) |
|
|
105
108
|
| Batch Write | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/batch-write.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/batch-write.js,samples/README.md) |
|
|
106
109
|
| Batch | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/batch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/batch.js,samples/README.md) |
|
|
110
|
+
| Creates a full backup schedule | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/create-full-backup-schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/create-full-backup-schedule.js,samples/README.md) |
|
|
111
|
+
| Creates an incremental backup schedule | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/create-incremental-backup-schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/create-incremental-backup-schedule.js,samples/README.md) |
|
|
107
112
|
| CRUD | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/crud.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/crud.js,samples/README.md) |
|
|
108
113
|
| Creates a new database with a specific default leader | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-create-with-default-leader.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-create-with-default-leader.js,samples/README.md) |
|
|
109
114
|
| Database-create-with-encryption-key | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-create-with-encryption-key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-create-with-encryption-key.js,samples/README.md) |
|
|
115
|
+
| Database-create-with-multiple-kms-keys | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-create-with-multiple-kms-keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-create-with-multiple-kms-keys.js,samples/README.md) |
|
|
110
116
|
| Database-create-with-version-retention-period | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-create-with-version-retention-period.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-create-with-version-retention-period.js,samples/README.md) |
|
|
111
117
|
| Gets the schema definition of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-get-ddl.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-get-ddl.js,samples/README.md) |
|
|
112
118
|
| Gets the default leader option of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-get-default-leader.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-get-default-leader.js,samples/README.md) |
|
|
113
119
|
| Updates the default leader of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-update-default-leader.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-update-default-leader.js,samples/README.md) |
|
|
114
120
|
| Updates a Cloud Spanner Database. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-update.js,samples/README.md) |
|
|
115
121
|
| Datatypes | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/datatypes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/datatypes.js,samples/README.md) |
|
|
122
|
+
| Deletes a backup schedule | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/delete-backup-schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/delete-backup-schedule.js,samples/README.md) |
|
|
116
123
|
| Runs an execute sql request with directed read options | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/directed-reads.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/directed-reads.js,samples/README.md) |
|
|
117
124
|
| Delete using DML returning. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-delete.js,samples/README.md) |
|
|
118
125
|
| Insert using DML returning. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-insert.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-insert.js,samples/README.md) |
|
|
119
126
|
| Update using DML returning. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-update.js,samples/README.md) |
|
|
120
127
|
| DML | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml.js,samples/README.md) |
|
|
121
128
|
| Enable fine grained access control | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/enable-fine-grained-access.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/enable-fine-grained-access.js,samples/README.md) |
|
|
129
|
+
| Gets a backup schedule | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/get-backup-schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/get-backup-schedule.js,samples/README.md) |
|
|
122
130
|
| Get-commit-stats | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/get-commit-stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/get-commit-stats.js,samples/README.md) |
|
|
123
131
|
| List database roles | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/get-database-roles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/get-database-roles.js,samples/README.md) |
|
|
124
132
|
| Gets the instance config metadata for the configuration nam6 | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/get-instance-config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/get-instance-config.js,samples/README.md) |
|
|
@@ -133,18 +141,21 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
|
|
|
133
141
|
| Lists the instance configuration operations. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-config-get-operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-config-get-operations.js,samples/README.md) |
|
|
134
142
|
| Updates a user-managed instance configuration. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-config-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-config-update.js,samples/README.md) |
|
|
135
143
|
| Creates a new instance partition | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-partition-create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-partition-create.js,samples/README.md) |
|
|
144
|
+
| Updates an instance. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-update.js,samples/README.md) |
|
|
136
145
|
| Creates a instance with autoscaling config. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-with-autoscaling-config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-with-autoscaling-config.js,samples/README.md) |
|
|
137
146
|
| Instance-with-processing-units | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-with-processing-units.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-with-processing-units.js,samples/README.md) |
|
|
138
147
|
| Instance | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance.js,samples/README.md) |
|
|
139
148
|
| Json-add-column | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/json-add-column.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/json-add-column.js,samples/README.md) |
|
|
140
149
|
| Json-query-parameter | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/json-query-parameter.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/json-query-parameter.js,samples/README.md) |
|
|
141
150
|
| Json-update-data | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/json-update-data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/json-update-data.js,samples/README.md) |
|
|
151
|
+
| Lists backup schedules of a database | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/list-backup-schedules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/list-backup-schedules.js,samples/README.md) |
|
|
142
152
|
| Lists all databases on the selected instance | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/list-databases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/list-databases.js,samples/README.md) |
|
|
143
153
|
| Lists all the available instance configs for the selected project. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/list-instance-configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/list-instance-configs.js,samples/README.md) |
|
|
144
154
|
| Executes request with max commit delay | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/max-commit-delay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/max-commit-delay.js,samples/README.md) |
|
|
145
155
|
| Numeric-add-column | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/numeric-add-column.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/numeric-add-column.js,samples/README.md) |
|
|
146
156
|
| Numeric-query-parameter | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/numeric-query-parameter.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/numeric-query-parameter.js,samples/README.md) |
|
|
147
157
|
| Numeric-update-data | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/numeric-update-data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/numeric-update-data.js,samples/README.md) |
|
|
158
|
+
| Observability (Tracing) with OpenTelemetry | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/observability-traces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/observability-traces.js,samples/README.md) |
|
|
148
159
|
| Adds a column to an existing table in a Spanner PostgreSQL database. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/pg-add-column.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/pg-add-column.js,samples/README.md) |
|
|
149
160
|
| Showcase the rules for case-sensitivity and case folding for a Spanner PostgreSQL database. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/pg-case-sensitivity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/pg-case-sensitivity.js,samples/README.md) |
|
|
150
161
|
| Creates a PostgreSQL Database. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/pg-database-create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/pg-database-create.js,samples/README.md) |
|
|
@@ -194,6 +205,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
|
|
|
194
205
|
| Timestamp | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/timestamp.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/timestamp.js,samples/README.md) |
|
|
195
206
|
| Executes a read/write transaction with transaction and request tags | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/transaction-tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/transaction-tag.js,samples/README.md) |
|
|
196
207
|
| Transaction | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/transaction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/transaction.js,samples/README.md) |
|
|
208
|
+
| Updates a backup schedule | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/update-backup-schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/update-backup-schedule.js,samples/README.md) |
|
|
197
209
|
|
|
198
210
|
|
|
199
211
|
|
|
@@ -263,4 +275,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-spanner/blob/main/LICENSE)
|
|
|
263
275
|
[projects]: https://console.cloud.google.com/project
|
|
264
276
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
265
277
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=spanner.googleapis.com
|
|
266
|
-
[auth]: https://cloud.google.com/docs/authentication/
|
|
278
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
@@ -16,6 +16,7 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package google.spanner.admin.instance.v1;
|
|
18
18
|
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
19
20
|
import "google/protobuf/timestamp.proto";
|
|
20
21
|
|
|
21
22
|
option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1";
|
|
@@ -54,3 +55,9 @@ enum FulfillmentPeriod {
|
|
|
54
55
|
// to complete.
|
|
55
56
|
FULFILLMENT_PERIOD_EXTENDED = 2;
|
|
56
57
|
}
|
|
58
|
+
|
|
59
|
+
// ReplicaSelection identifies replicas with common properties.
|
|
60
|
+
message ReplicaSelection {
|
|
61
|
+
// Required. Name of the location of the replicas (e.g., "us-central1").
|
|
62
|
+
string location = 1 [(google.api.field_behavior) = REQUIRED];
|
|
63
|
+
}
|
|
@@ -803,6 +803,34 @@ message InstanceConfig {
|
|
|
803
803
|
State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
804
804
|
}
|
|
805
805
|
|
|
806
|
+
// ReplicaComputeCapacity describes the amount of server resources that are
|
|
807
|
+
// allocated to each replica identified by the replica selection.
|
|
808
|
+
message ReplicaComputeCapacity {
|
|
809
|
+
// Required. Identifies replicas by specified properties.
|
|
810
|
+
// All replicas in the selection have the same amount of compute capacity.
|
|
811
|
+
ReplicaSelection replica_selection = 1
|
|
812
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
813
|
+
|
|
814
|
+
// Compute capacity allocated to each replica identified by the specified
|
|
815
|
+
// selection.
|
|
816
|
+
// The unit is selected based on the unit used to specify the instance size
|
|
817
|
+
// for non-autoscaling instances, or the unit used in autoscaling limit for
|
|
818
|
+
// autoscaling instances.
|
|
819
|
+
oneof compute_capacity {
|
|
820
|
+
// The number of nodes allocated to each replica.
|
|
821
|
+
//
|
|
822
|
+
// This may be zero in API responses for instances that are not yet in
|
|
823
|
+
// state `READY`.
|
|
824
|
+
int32 node_count = 2;
|
|
825
|
+
|
|
826
|
+
// The number of processing units allocated to each replica.
|
|
827
|
+
//
|
|
828
|
+
// This may be zero in API responses for instances that are not yet in
|
|
829
|
+
// state `READY`.
|
|
830
|
+
int32 processing_units = 3;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
806
834
|
// Autoscaling configuration for an instance.
|
|
807
835
|
message AutoscalingConfig {
|
|
808
836
|
// The autoscaling limits for the instance. Users can define the minimum and
|
|
@@ -854,6 +882,37 @@ message AutoscalingConfig {
|
|
|
854
882
|
[(google.api.field_behavior) = REQUIRED];
|
|
855
883
|
}
|
|
856
884
|
|
|
885
|
+
// AsymmetricAutoscalingOption specifies the scaling of replicas identified by
|
|
886
|
+
// the given selection.
|
|
887
|
+
message AsymmetricAutoscalingOption {
|
|
888
|
+
// Overrides the top-level autoscaling configuration for the replicas
|
|
889
|
+
// identified by `replica_selection`. All fields in this message are
|
|
890
|
+
// optional. Any unspecified fields will use the corresponding values from
|
|
891
|
+
// the top-level autoscaling configuration.
|
|
892
|
+
message AutoscalingConfigOverrides {
|
|
893
|
+
// Optional. If specified, overrides the min/max limit in the top-level
|
|
894
|
+
// autoscaling configuration for the selected replicas.
|
|
895
|
+
AutoscalingLimits autoscaling_limits = 1
|
|
896
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
897
|
+
|
|
898
|
+
// Optional. If specified, overrides the autoscaling target
|
|
899
|
+
// high_priority_cpu_utilization_percent in the top-level autoscaling
|
|
900
|
+
// configuration for the selected replicas.
|
|
901
|
+
int32 autoscaling_target_high_priority_cpu_utilization_percent = 2
|
|
902
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
// Required. Selects the replicas to which this AsymmetricAutoscalingOption
|
|
906
|
+
// applies. Only read-only replicas are supported.
|
|
907
|
+
ReplicaSelection replica_selection = 1
|
|
908
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
909
|
+
|
|
910
|
+
// Optional. Overrides applied to the top-level autoscaling configuration
|
|
911
|
+
// for the selected replicas.
|
|
912
|
+
AutoscalingConfigOverrides overrides = 2
|
|
913
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
914
|
+
}
|
|
915
|
+
|
|
857
916
|
// Required. Autoscaling limits for an instance.
|
|
858
917
|
AutoscalingLimits autoscaling_limits = 1
|
|
859
918
|
[(google.api.field_behavior) = REQUIRED];
|
|
@@ -861,6 +920,18 @@ message AutoscalingConfig {
|
|
|
861
920
|
// Required. The autoscaling targets for an instance.
|
|
862
921
|
AutoscalingTargets autoscaling_targets = 2
|
|
863
922
|
[(google.api.field_behavior) = REQUIRED];
|
|
923
|
+
|
|
924
|
+
// Optional. Optional asymmetric autoscaling options.
|
|
925
|
+
// Replicas matching the replica selection criteria will be autoscaled
|
|
926
|
+
// independently from other replicas. The autoscaler will scale the replicas
|
|
927
|
+
// based on the utilization of replicas identified by the replica selection.
|
|
928
|
+
// Replica selections should not overlap with each other.
|
|
929
|
+
//
|
|
930
|
+
// Other replicas (those do not match any replica selection) will be
|
|
931
|
+
// autoscaled together and will have the same compute capacity allocated to
|
|
932
|
+
// them.
|
|
933
|
+
repeated AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3
|
|
934
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
864
935
|
}
|
|
865
936
|
|
|
866
937
|
// An isolated set of Cloud Spanner resources on which databases can be hosted.
|
|
@@ -901,6 +972,24 @@ message Instance {
|
|
|
901
972
|
ENTERPRISE_PLUS = 3;
|
|
902
973
|
}
|
|
903
974
|
|
|
975
|
+
// Indicates the default backup behavior for new databases within the
|
|
976
|
+
// instance.
|
|
977
|
+
enum DefaultBackupScheduleType {
|
|
978
|
+
// Not specified.
|
|
979
|
+
DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0;
|
|
980
|
+
|
|
981
|
+
// No default backup schedule will be created automatically on creation of a
|
|
982
|
+
// database within the instance.
|
|
983
|
+
NONE = 1;
|
|
984
|
+
|
|
985
|
+
// A default backup schedule will be created automatically on creation of a
|
|
986
|
+
// database within the instance. The default backup schedule creates a full
|
|
987
|
+
// backup every 24 hours and retains the backup for a period of 7 days. Once
|
|
988
|
+
// created, the default backup schedule can be edited/deleted similar to any
|
|
989
|
+
// other backup schedule.
|
|
990
|
+
AUTOMATIC = 2;
|
|
991
|
+
}
|
|
992
|
+
|
|
904
993
|
// Required. A unique identifier for the instance, which cannot be changed
|
|
905
994
|
// after the instance is created. Values are of the form
|
|
906
995
|
// `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
|
|
@@ -922,34 +1011,56 @@ message Instance {
|
|
|
922
1011
|
// Must be unique per project and between 4 and 30 characters in length.
|
|
923
1012
|
string display_name = 3 [(google.api.field_behavior) = REQUIRED];
|
|
924
1013
|
|
|
925
|
-
// The number of nodes allocated to this instance. At most one of either
|
|
926
|
-
// node_count or processing_units should be present in the message.
|
|
1014
|
+
// The number of nodes allocated to this instance. At most, one of either
|
|
1015
|
+
// `node_count` or `processing_units` should be present in the message.
|
|
927
1016
|
//
|
|
928
|
-
// Users can set the node_count field to specify the target number of nodes
|
|
1017
|
+
// Users can set the `node_count` field to specify the target number of nodes
|
|
929
1018
|
// allocated to the instance.
|
|
930
1019
|
//
|
|
931
|
-
//
|
|
932
|
-
//
|
|
1020
|
+
// If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
|
|
1021
|
+
// field and reflects the current number of nodes allocated to the instance.
|
|
933
1022
|
//
|
|
934
|
-
//
|
|
935
|
-
//
|
|
936
|
-
//
|
|
1023
|
+
// This might be zero in API responses for instances that are not yet in the
|
|
1024
|
+
// `READY` state.
|
|
1025
|
+
//
|
|
1026
|
+
// If the instance has varying node count across replicas (achieved by
|
|
1027
|
+
// setting asymmetric_autoscaling_options in autoscaling config), the
|
|
1028
|
+
// node_count here is the maximum node count across all replicas.
|
|
1029
|
+
//
|
|
1030
|
+
// For more information, see
|
|
1031
|
+
// [Compute capacity, nodes, and processing
|
|
1032
|
+
// units](https://cloud.google.com/spanner/docs/compute-capacity).
|
|
937
1033
|
int32 node_count = 5;
|
|
938
1034
|
|
|
939
|
-
// The number of processing units allocated to this instance. At most one of
|
|
940
|
-
// processing_units or node_count should be present in the message.
|
|
1035
|
+
// The number of processing units allocated to this instance. At most, one of
|
|
1036
|
+
// either `processing_units` or `node_count` should be present in the message.
|
|
941
1037
|
//
|
|
942
|
-
// Users can set the processing_units field to specify the target number of
|
|
1038
|
+
// Users can set the `processing_units` field to specify the target number of
|
|
943
1039
|
// processing units allocated to the instance.
|
|
944
1040
|
//
|
|
945
|
-
//
|
|
946
|
-
// `
|
|
1041
|
+
// If autoscaling is enabled, `processing_units` is treated as an
|
|
1042
|
+
// `OUTPUT_ONLY` field and reflects the current number of processing units
|
|
1043
|
+
// allocated to the instance.
|
|
947
1044
|
//
|
|
948
|
-
//
|
|
949
|
-
//
|
|
950
|
-
//
|
|
1045
|
+
// This might be zero in API responses for instances that are not yet in the
|
|
1046
|
+
// `READY` state.
|
|
1047
|
+
//
|
|
1048
|
+
// If the instance has varying processing units per replica
|
|
1049
|
+
// (achieved by setting asymmetric_autoscaling_options in autoscaling config),
|
|
1050
|
+
// the processing_units here is the maximum processing units across all
|
|
1051
|
+
// replicas.
|
|
1052
|
+
//
|
|
1053
|
+
// For more information, see
|
|
1054
|
+
// [Compute capacity, nodes and processing
|
|
1055
|
+
// units](https://cloud.google.com/spanner/docs/compute-capacity).
|
|
951
1056
|
int32 processing_units = 9;
|
|
952
1057
|
|
|
1058
|
+
// Output only. Lists the compute capacity per ReplicaSelection. A replica
|
|
1059
|
+
// selection identifies a set of replicas with common properties. Replicas
|
|
1060
|
+
// identified by a ReplicaSelection are scaled with the same compute capacity.
|
|
1061
|
+
repeated ReplicaComputeCapacity replica_compute_capacity = 19
|
|
1062
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1063
|
+
|
|
953
1064
|
// Optional. The autoscaling configuration. Autoscaling is enabled if this
|
|
954
1065
|
// field is set. When autoscaling is enabled, node_count and processing_units
|
|
955
1066
|
// are treated as OUTPUT_ONLY fields and reflect the current compute capacity
|
|
@@ -1000,6 +1111,18 @@ message Instance {
|
|
|
1000
1111
|
|
|
1001
1112
|
// Optional. The `Edition` of the current instance.
|
|
1002
1113
|
Edition edition = 20 [(google.api.field_behavior) = OPTIONAL];
|
|
1114
|
+
|
|
1115
|
+
// Optional. Controls the default backup behavior for new databases within the
|
|
1116
|
+
// instance.
|
|
1117
|
+
//
|
|
1118
|
+
// Note that `AUTOMATIC` is not permitted for free instances, as backups and
|
|
1119
|
+
// backup schedules are not allowed for free instances.
|
|
1120
|
+
//
|
|
1121
|
+
// In the `GetInstance` or `ListInstances` response, if the value of
|
|
1122
|
+
// default_backup_schedule_type is unset or NONE, no default backup
|
|
1123
|
+
// schedule will be created for new databases within the instance.
|
|
1124
|
+
DefaultBackupScheduleType default_backup_schedule_type = 23
|
|
1125
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1003
1126
|
}
|
|
1004
1127
|
|
|
1005
1128
|
// The request for
|
|
@@ -17,6 +17,7 @@ syntax = "proto3";
|
|
|
17
17
|
package google.spanner.v1;
|
|
18
18
|
|
|
19
19
|
import "google/protobuf/timestamp.proto";
|
|
20
|
+
import "google/spanner/v1/transaction.proto";
|
|
20
21
|
|
|
21
22
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
22
23
|
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
@@ -47,4 +48,12 @@ message CommitResponse {
|
|
|
47
48
|
// For more information, see
|
|
48
49
|
// [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
|
|
49
50
|
CommitStats commit_stats = 2;
|
|
51
|
+
|
|
52
|
+
// Clients should examine and retry the commit if any of the following
|
|
53
|
+
// reasons are populated.
|
|
54
|
+
oneof MultiplexedSessionRetry {
|
|
55
|
+
// If specified, transaction has not committed yet.
|
|
56
|
+
// Clients must retry the commit with the new precommit token.
|
|
57
|
+
MultiplexedSessionPrecommitToken precommit_token = 4;
|
|
58
|
+
}
|
|
50
59
|
}
|
|
@@ -16,6 +16,7 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package google.spanner.v1;
|
|
18
18
|
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
19
20
|
import "google/protobuf/struct.proto";
|
|
20
21
|
import "google/spanner/v1/query_plan.proto";
|
|
21
22
|
import "google/spanner/v1/transaction.proto";
|
|
@@ -53,6 +54,16 @@ message ResultSet {
|
|
|
53
54
|
// Other fields may or may not be populated, based on the
|
|
54
55
|
// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
|
|
55
56
|
ResultSetStats stats = 3;
|
|
57
|
+
|
|
58
|
+
// Optional. A precommit token will be included if the read-write transaction
|
|
59
|
+
// is on a multiplexed session.
|
|
60
|
+
// The precommit token with the highest sequence number from this transaction
|
|
61
|
+
// attempt should be passed to the
|
|
62
|
+
// [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
|
|
63
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
64
|
+
// error.
|
|
65
|
+
MultiplexedSessionPrecommitToken precommit_token = 5
|
|
66
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
56
67
|
}
|
|
57
68
|
|
|
58
69
|
// Partial results from a streaming read or SQL query. Streaming reads and
|
|
@@ -157,6 +168,16 @@ message PartialResultSet {
|
|
|
157
168
|
// This field will also be present in the last response for DML
|
|
158
169
|
// statements.
|
|
159
170
|
ResultSetStats stats = 5;
|
|
171
|
+
|
|
172
|
+
// Optional. A precommit token will be included if the read-write transaction
|
|
173
|
+
// is on a multiplexed session.
|
|
174
|
+
// The precommit token with the highest sequence number from this transaction
|
|
175
|
+
// attempt should be passed to the
|
|
176
|
+
// [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
|
|
177
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
178
|
+
// error.
|
|
179
|
+
MultiplexedSessionPrecommitToken precommit_token = 8
|
|
180
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
160
181
|
}
|
|
161
182
|
|
|
162
183
|
// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet].
|
|
@@ -628,9 +628,19 @@ message ExecuteSqlRequest {
|
|
|
628
628
|
// execution statistics information.
|
|
629
629
|
PLAN = 1;
|
|
630
630
|
|
|
631
|
-
// This mode returns
|
|
632
|
-
// with the results.
|
|
631
|
+
// This mode returns the query plan, overall execution statistics,
|
|
632
|
+
// operator level execution statistics along with the results. This has a
|
|
633
|
+
// performance overhead compared to the other modes. It is not recommended
|
|
634
|
+
// to use this mode for production traffic.
|
|
633
635
|
PROFILE = 2;
|
|
636
|
+
|
|
637
|
+
// This mode returns the overall (but not operator-level) execution
|
|
638
|
+
// statistics along with the results.
|
|
639
|
+
WITH_STATS = 3;
|
|
640
|
+
|
|
641
|
+
// This mode returns the query plan, overall (but not operator-level)
|
|
642
|
+
// execution statistics along with the results.
|
|
643
|
+
WITH_PLAN_AND_STATS = 4;
|
|
634
644
|
}
|
|
635
645
|
|
|
636
646
|
// Query optimizer configuration.
|
|
@@ -899,6 +909,16 @@ message ExecuteBatchDmlResponse {
|
|
|
899
909
|
// If all DML statements are executed successfully, the status is `OK`.
|
|
900
910
|
// Otherwise, the error status of the first failed statement.
|
|
901
911
|
google.rpc.Status status = 2;
|
|
912
|
+
|
|
913
|
+
// Optional. A precommit token will be included if the read-write transaction
|
|
914
|
+
// is on a multiplexed session.
|
|
915
|
+
// The precommit token with the highest sequence number from this transaction
|
|
916
|
+
// attempt should be passed to the
|
|
917
|
+
// [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
|
|
918
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
919
|
+
// error.
|
|
920
|
+
MultiplexedSessionPrecommitToken precommit_token = 3
|
|
921
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
902
922
|
}
|
|
903
923
|
|
|
904
924
|
// Options for a PartitionQueryRequest and
|
|
@@ -1215,6 +1235,14 @@ message BeginTransactionRequest {
|
|
|
1215
1235
|
// transaction, set it on the reads and writes that are part of this
|
|
1216
1236
|
// transaction instead.
|
|
1217
1237
|
RequestOptions request_options = 3;
|
|
1238
|
+
|
|
1239
|
+
// Optional. Required for read-write transactions on a multiplexed session
|
|
1240
|
+
// that commit mutations but do not perform any reads or queries. Clients
|
|
1241
|
+
// should randomly select one of the mutations from the mutation set and send
|
|
1242
|
+
// it as a part of this request.
|
|
1243
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
1244
|
+
// error.
|
|
1245
|
+
Mutation mutation_key = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1218
1246
|
}
|
|
1219
1247
|
|
|
1220
1248
|
// The request for [Commit][google.spanner.v1.Spanner.Commit].
|
|
@@ -1262,6 +1290,15 @@ message CommitRequest {
|
|
|
1262
1290
|
|
|
1263
1291
|
// Common options for this request.
|
|
1264
1292
|
RequestOptions request_options = 6;
|
|
1293
|
+
|
|
1294
|
+
// Optional. If the read-write transaction was executed on a multiplexed
|
|
1295
|
+
// session, the precommit token with the highest sequence number received in
|
|
1296
|
+
// this transaction attempt, should be included here. Failing to do so will
|
|
1297
|
+
// result in a FailedPrecondition error.
|
|
1298
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
1299
|
+
// error.
|
|
1300
|
+
MultiplexedSessionPrecommitToken precommit_token = 9
|
|
1301
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1265
1302
|
}
|
|
1266
1303
|
|
|
1267
1304
|
// The request for [Rollback][google.spanner.v1.Spanner.Rollback].
|
|
@@ -16,6 +16,7 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package google.spanner.v1;
|
|
18
18
|
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
19
20
|
import "google/protobuf/duration.proto";
|
|
20
21
|
import "google/protobuf/timestamp.proto";
|
|
21
22
|
|
|
@@ -378,6 +379,14 @@ message TransactionOptions {
|
|
|
378
379
|
|
|
379
380
|
// Read lock mode for the transaction.
|
|
380
381
|
ReadLockMode read_lock_mode = 1;
|
|
382
|
+
|
|
383
|
+
// Optional. Clients should pass the transaction ID of the previous
|
|
384
|
+
// transaction attempt that was aborted if this transaction is being
|
|
385
|
+
// executed on a multiplexed session.
|
|
386
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
387
|
+
// error.
|
|
388
|
+
bytes multiplexed_session_previous_transaction_id = 2
|
|
389
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
381
390
|
}
|
|
382
391
|
|
|
383
392
|
// Message type to initiate a Partitioned DML transaction.
|
|
@@ -512,6 +521,17 @@ message Transaction {
|
|
|
512
521
|
// A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
|
|
513
522
|
// Example: `"2014-10-02T15:01:23.045123456Z"`.
|
|
514
523
|
google.protobuf.Timestamp read_timestamp = 2;
|
|
524
|
+
|
|
525
|
+
// A precommit token will be included in the response of a BeginTransaction
|
|
526
|
+
// request if the read-write transaction is on a multiplexed session and
|
|
527
|
+
// a mutation_key was specified in the
|
|
528
|
+
// [BeginTransaction][google.spanner.v1.BeginTransactionRequest].
|
|
529
|
+
// The precommit token with the highest sequence number from this transaction
|
|
530
|
+
// attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit]
|
|
531
|
+
// request for this transaction.
|
|
532
|
+
// This feature is not yet supported and will result in an UNIMPLEMENTED
|
|
533
|
+
// error.
|
|
534
|
+
MultiplexedSessionPrecommitToken precommit_token = 3;
|
|
515
535
|
}
|
|
516
536
|
|
|
517
537
|
// This message is used to select the transaction in which a
|
|
@@ -539,3 +559,17 @@ message TransactionSelector {
|
|
|
539
559
|
TransactionOptions begin = 3;
|
|
540
560
|
}
|
|
541
561
|
}
|
|
562
|
+
|
|
563
|
+
// When a read-write transaction is executed on a multiplexed session,
|
|
564
|
+
// this precommit token is sent back to the client
|
|
565
|
+
// as a part of the [Transaction] message in the BeginTransaction response and
|
|
566
|
+
// also as a part of the [ResultSet] and [PartialResultSet] responses.
|
|
567
|
+
message MultiplexedSessionPrecommitToken {
|
|
568
|
+
// Opaque precommit token.
|
|
569
|
+
bytes precommit_token = 1;
|
|
570
|
+
|
|
571
|
+
// An incrementing seq number is generated on every precommit token
|
|
572
|
+
// that is returned. Clients should remember the precommit token with the
|
|
573
|
+
// highest sequence number from the current transaction attempt.
|
|
574
|
+
int32 seq_num = 2;
|
|
575
|
+
}
|