@google-cloud/spanner 7.9.1 → 7.10.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.
@@ -164,12 +164,9 @@ class SpannerClient {
164
164
  // Some of the methods on this service provide streaming responses.
165
165
  // Provide descriptors for these.
166
166
  this.descriptors.stream = {
167
- executeStreamingSql: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback,
168
- /* gaxStreamingRetries: */ false),
169
- streamingRead: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback,
170
- /* gaxStreamingRetries: */ false),
171
- batchWrite: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback,
172
- /* gaxStreamingRetries: */ false),
167
+ executeStreamingSql: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries),
168
+ streamingRead: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries),
169
+ batchWrite: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries),
173
170
  };
174
171
  // Put together the default options sent with requests.
175
172
  this._defaults = this._gaxGrpc.constructSettings('google.spanner.v1.Spanner', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -741,6 +738,17 @@ class SpannerClient {
741
738
  *
742
739
  * If the field is set to `true` but the request does not set
743
740
  * `partition_token`, the API returns an `INVALID_ARGUMENT` error.
741
+ * @param {google.spanner.v1.ReadRequest.OrderBy} [request.orderBy]
742
+ * Optional. Order for the returned rows.
743
+ *
744
+ * By default, Spanner will return result rows in primary key order except for
745
+ * PartitionRead requests. For applications that do not require rows to be
746
+ * returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
747
+ * `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
748
+ * resulting in lower latencies in certain cases (e.g. bulk point lookups).
749
+ * @param {google.spanner.v1.ReadRequest.LockHint} [request.lockHint]
750
+ * Optional. Lock Hint for the request, it can only be used with read-write
751
+ * transactions.
744
752
  * @param {object} [options]
745
753
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
746
754
  * @returns {Stream}
@@ -168,6 +168,48 @@ export declare class SpannerExecutorProxyClient {
168
168
  * @returns {string} A string representing the backup.
169
169
  */
170
170
  matchBackupFromBackupName(backupName: string): string | number;
171
+ /**
172
+ * Return a fully-qualified backupSchedule resource name string.
173
+ *
174
+ * @param {string} project
175
+ * @param {string} instance
176
+ * @param {string} database
177
+ * @param {string} schedule
178
+ * @returns {string} Resource name string.
179
+ */
180
+ backupSchedulePath(project: string, instance: string, database: string, schedule: string): string;
181
+ /**
182
+ * Parse the project from BackupSchedule resource.
183
+ *
184
+ * @param {string} backupScheduleName
185
+ * A fully-qualified path representing BackupSchedule resource.
186
+ * @returns {string} A string representing the project.
187
+ */
188
+ matchProjectFromBackupScheduleName(backupScheduleName: string): string | number;
189
+ /**
190
+ * Parse the instance from BackupSchedule resource.
191
+ *
192
+ * @param {string} backupScheduleName
193
+ * A fully-qualified path representing BackupSchedule resource.
194
+ * @returns {string} A string representing the instance.
195
+ */
196
+ matchInstanceFromBackupScheduleName(backupScheduleName: string): string | number;
197
+ /**
198
+ * Parse the database from BackupSchedule resource.
199
+ *
200
+ * @param {string} backupScheduleName
201
+ * A fully-qualified path representing BackupSchedule resource.
202
+ * @returns {string} A string representing the database.
203
+ */
204
+ matchDatabaseFromBackupScheduleName(backupScheduleName: string): string | number;
205
+ /**
206
+ * Parse the schedule from BackupSchedule resource.
207
+ *
208
+ * @param {string} backupScheduleName
209
+ * A fully-qualified path representing BackupSchedule resource.
210
+ * @returns {string} A string representing the schedule.
211
+ */
212
+ matchScheduleFromBackupScheduleName(backupScheduleName: string): string | number;
171
213
  /**
172
214
  * Return a fully-qualified database resource name string.
173
215
  *
@@ -148,6 +148,7 @@ class SpannerExecutorProxyClient {
148
148
  // Create useful helper objects for these.
149
149
  this.pathTemplates = {
150
150
  backupPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/instances/{instance}/backups/{backup}'),
151
+ backupSchedulePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/instances/{instance}/databases/{database}/backupSchedules/{schedule}'),
151
152
  databasePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/instances/{instance}/databases/{database}'),
152
153
  databaseRolePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/instances/{instance}/databases/{database}/databaseRoles/{role}'),
153
154
  instancePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/instances/{instance}'),
@@ -158,8 +159,7 @@ class SpannerExecutorProxyClient {
158
159
  // Some of the methods on this service provide streaming responses.
159
160
  // Provide descriptors for these.
160
161
  this.descriptors.stream = {
161
- executeActionAsync: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback,
162
- /* gaxStreamingRetries: */ false),
162
+ executeActionAsync: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries),
163
163
  };
164
164
  // Put together the default options sent with requests.
165
165
  this._defaults = this._gaxGrpc.constructSettings('google.spanner.executor.v1.SpannerExecutorProxy', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -355,6 +355,63 @@ class SpannerExecutorProxyClient {
355
355
  matchBackupFromBackupName(backupName) {
356
356
  return this.pathTemplates.backupPathTemplate.match(backupName).backup;
357
357
  }
358
+ /**
359
+ * Return a fully-qualified backupSchedule resource name string.
360
+ *
361
+ * @param {string} project
362
+ * @param {string} instance
363
+ * @param {string} database
364
+ * @param {string} schedule
365
+ * @returns {string} Resource name string.
366
+ */
367
+ backupSchedulePath(project, instance, database, schedule) {
368
+ return this.pathTemplates.backupSchedulePathTemplate.render({
369
+ project: project,
370
+ instance: instance,
371
+ database: database,
372
+ schedule: schedule,
373
+ });
374
+ }
375
+ /**
376
+ * Parse the project from BackupSchedule resource.
377
+ *
378
+ * @param {string} backupScheduleName
379
+ * A fully-qualified path representing BackupSchedule resource.
380
+ * @returns {string} A string representing the project.
381
+ */
382
+ matchProjectFromBackupScheduleName(backupScheduleName) {
383
+ return this.pathTemplates.backupSchedulePathTemplate.match(backupScheduleName).project;
384
+ }
385
+ /**
386
+ * Parse the instance from BackupSchedule resource.
387
+ *
388
+ * @param {string} backupScheduleName
389
+ * A fully-qualified path representing BackupSchedule resource.
390
+ * @returns {string} A string representing the instance.
391
+ */
392
+ matchInstanceFromBackupScheduleName(backupScheduleName) {
393
+ return this.pathTemplates.backupSchedulePathTemplate.match(backupScheduleName).instance;
394
+ }
395
+ /**
396
+ * Parse the database from BackupSchedule resource.
397
+ *
398
+ * @param {string} backupScheduleName
399
+ * A fully-qualified path representing BackupSchedule resource.
400
+ * @returns {string} A string representing the database.
401
+ */
402
+ matchDatabaseFromBackupScheduleName(backupScheduleName) {
403
+ return this.pathTemplates.backupSchedulePathTemplate.match(backupScheduleName).database;
404
+ }
405
+ /**
406
+ * Parse the schedule from BackupSchedule resource.
407
+ *
408
+ * @param {string} backupScheduleName
409
+ * A fully-qualified path representing BackupSchedule resource.
410
+ * @returns {string} A string representing the schedule.
411
+ */
412
+ matchScheduleFromBackupScheduleName(backupScheduleName) {
413
+ return this.pathTemplates.backupSchedulePathTemplate.match(backupScheduleName).schedule;
414
+ }
358
415
  /**
359
416
  * Return a fully-qualified database resource name string.
360
417
  *
@@ -1,5 +1,6 @@
1
1
  [
2
2
  "../../protos/google/spanner/admin/database/v1/backup.proto",
3
+ "../../protos/google/spanner/admin/database/v1/backup_schedule.proto",
3
4
  "../../protos/google/spanner/admin/database/v1/common.proto",
4
5
  "../../protos/google/spanner/admin/instance/v1/common.proto",
5
6
  "../../protos/google/spanner/executor/v1/cloud_executor.proto",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@google-cloud/spanner",
3
3
  "description": "Cloud Spanner Client Library for Node.js",
4
- "version": "7.9.1",
4
+ "version": "7.10.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Google Inc.",
7
7
  "engines": {
@@ -66,7 +66,7 @@
66
66
  "events-intercept": "^2.0.0",
67
67
  "extend": "^3.0.2",
68
68
  "google-auth-library": "^9.0.0",
69
- "google-gax": "4.3.7",
69
+ "google-gax": "4.3.8",
70
70
  "grpc-gcp": "^1.0.0",
71
71
  "is": "^3.2.1",
72
72
  "lodash.snakecase": "^4.1.1",