@google-cloud/spanner 7.0.0 → 7.2.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 +31 -0
- package/README.md +1 -0
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +80 -4
- package/build/protos/google/spanner/v1/spanner.proto +318 -142
- package/build/protos/google/spanner/v1/type.proto +6 -1
- package/build/protos/protos.d.ts +1722 -82
- package/build/protos/protos.js +7233 -2692
- package/build/protos/protos.json +520 -7
- package/build/src/common-grpc/service.js +2 -2
- package/build/src/index.d.ts +5 -0
- package/build/src/index.js +5 -0
- package/build/src/session-pool.js +2 -0
- package/build/src/transaction.d.ts +12 -0
- package/build/src/transaction.js +24 -1
- package/build/src/v1/database_admin_client.d.ts +184 -221
- package/build/src/v1/database_admin_client.js +77 -94
- package/build/src/v1/instance_admin_client.d.ts +118 -143
- package/build/src/v1/instance_admin_client.js +41 -52
- package/build/src/v1/spanner_client.d.ts +245 -180
- package/build/src/v1/spanner_client.js +118 -59
- package/build/src/v1/spanner_client_config.json +5 -0
- package/package.json +9 -9
|
@@ -59,8 +59,7 @@ export declare class SpannerClient {
|
|
|
59
59
|
* API remote host.
|
|
60
60
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
61
61
|
* Follows the structure of {@link gapicConfig}.
|
|
62
|
-
* @param {boolean
|
|
63
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
62
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
64
63
|
* For more information, please check the
|
|
65
64
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
66
65
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
@@ -68,7 +67,7 @@ export declare class SpannerClient {
|
|
|
68
67
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
69
68
|
* ```
|
|
70
69
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
71
|
-
* const client = new SpannerClient({fallback:
|
|
70
|
+
* const client = new SpannerClient({fallback: true}, gax);
|
|
72
71
|
* ```
|
|
73
72
|
*/
|
|
74
73
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
@@ -140,9 +139,8 @@ export declare class SpannerClient {
|
|
|
140
139
|
* @param {object} [options]
|
|
141
140
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
142
141
|
* @returns {Promise} - The promise which resolves to an array.
|
|
143
|
-
* The first element of the array is an object representing {@link google.spanner.v1.Session
|
|
144
|
-
* Please see the
|
|
145
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
142
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.Session|Session}.
|
|
143
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
146
144
|
* for more details and examples.
|
|
147
145
|
*/
|
|
148
146
|
createSession(request?: protos.google.spanner.v1.ICreateSessionRequest, options?: CallOptions): Promise<[
|
|
@@ -169,13 +167,13 @@ export declare class SpannerClient {
|
|
|
169
167
|
* The API may return fewer than the requested number of sessions. If a
|
|
170
168
|
* specific number of sessions are desired, the client can make additional
|
|
171
169
|
* calls to BatchCreateSessions (adjusting
|
|
172
|
-
* {@link google.spanner.v1.BatchCreateSessionsRequest.session_count|session_count}
|
|
170
|
+
* {@link protos.google.spanner.v1.BatchCreateSessionsRequest.session_count|session_count}
|
|
171
|
+
* as necessary).
|
|
173
172
|
* @param {object} [options]
|
|
174
173
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
175
174
|
* @returns {Promise} - The promise which resolves to an array.
|
|
176
|
-
* The first element of the array is an object representing {@link google.spanner.v1.BatchCreateSessionsResponse
|
|
177
|
-
* Please see the
|
|
178
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
175
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.BatchCreateSessionsResponse|BatchCreateSessionsResponse}.
|
|
176
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
179
177
|
* for more details and examples.
|
|
180
178
|
*/
|
|
181
179
|
batchCreateSessions(request?: protos.google.spanner.v1.IBatchCreateSessionsRequest, options?: CallOptions): Promise<[
|
|
@@ -197,9 +195,8 @@ export declare class SpannerClient {
|
|
|
197
195
|
* @param {object} [options]
|
|
198
196
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
199
197
|
* @returns {Promise} - The promise which resolves to an array.
|
|
200
|
-
* The first element of the array is an object representing {@link google.spanner.v1.Session
|
|
201
|
-
* Please see the
|
|
202
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
198
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.Session|Session}.
|
|
199
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
203
200
|
* for more details and examples.
|
|
204
201
|
*/
|
|
205
202
|
getSession(request?: protos.google.spanner.v1.IGetSessionRequest, options?: CallOptions): Promise<[
|
|
@@ -221,9 +218,8 @@ export declare class SpannerClient {
|
|
|
221
218
|
* @param {object} [options]
|
|
222
219
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
223
220
|
* @returns {Promise} - The promise which resolves to an array.
|
|
224
|
-
* The first element of the array is an object representing {@link google.protobuf.Empty
|
|
225
|
-
* Please see the
|
|
226
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
221
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
222
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
227
223
|
* for more details and examples.
|
|
228
224
|
*/
|
|
229
225
|
deleteSession(request?: protos.google.spanner.v1.IDeleteSessionRequest, options?: CallOptions): Promise<[
|
|
@@ -241,10 +237,12 @@ export declare class SpannerClient {
|
|
|
241
237
|
*
|
|
242
238
|
* Operations inside read-write transactions might return `ABORTED`. If
|
|
243
239
|
* this occurs, the application should restart the transaction from
|
|
244
|
-
* the beginning. See {@link google.spanner.v1.Transaction|Transaction} for more
|
|
240
|
+
* the beginning. See {@link protos.google.spanner.v1.Transaction|Transaction} for more
|
|
241
|
+
* details.
|
|
245
242
|
*
|
|
246
243
|
* Larger result sets can be fetched in streaming fashion by calling
|
|
247
|
-
* {@link google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql}
|
|
244
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql}
|
|
245
|
+
* instead.
|
|
248
246
|
*
|
|
249
247
|
* @param {Object} request
|
|
250
248
|
* The request object that will be sent.
|
|
@@ -280,23 +278,27 @@ export declare class SpannerClient {
|
|
|
280
278
|
* @param {number[]} request.paramTypes
|
|
281
279
|
* It is not always possible for Cloud Spanner to infer the right SQL type
|
|
282
280
|
* from a JSON value. For example, values of type `BYTES` and values
|
|
283
|
-
* of type `STRING` both appear in
|
|
281
|
+
* of type `STRING` both appear in
|
|
282
|
+
* {@link protos.google.spanner.v1.ExecuteSqlRequest.params|params} as JSON strings.
|
|
284
283
|
*
|
|
285
284
|
* In these cases, `param_types` can be used to specify the exact
|
|
286
285
|
* SQL type for some or all of the SQL statement parameters. See the
|
|
287
|
-
* definition of {@link google.spanner.v1.Type|Type} for more information
|
|
286
|
+
* definition of {@link protos.google.spanner.v1.Type|Type} for more information
|
|
288
287
|
* about SQL types.
|
|
289
288
|
* @param {Buffer} request.resumeToken
|
|
290
289
|
* If this request is resuming a previously interrupted SQL statement
|
|
291
290
|
* execution, `resume_token` should be copied from the last
|
|
292
|
-
* {@link google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
293
|
-
* enables the new SQL statement execution to resume
|
|
294
|
-
* off. The rest of the request parameters must
|
|
295
|
-
* request that yielded this token.
|
|
291
|
+
* {@link protos.google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
292
|
+
* interruption. Doing this enables the new SQL statement execution to resume
|
|
293
|
+
* where the last one left off. The rest of the request parameters must
|
|
294
|
+
* exactly match the request that yielded this token.
|
|
296
295
|
* @param {google.spanner.v1.ExecuteSqlRequest.QueryMode} request.queryMode
|
|
297
296
|
* Used to control the amount of debugging information returned in
|
|
298
|
-
* {@link google.spanner.v1.ResultSetStats|ResultSetStats}. If
|
|
299
|
-
*
|
|
297
|
+
* {@link protos.google.spanner.v1.ResultSetStats|ResultSetStats}. If
|
|
298
|
+
* {@link protos.google.spanner.v1.ExecuteSqlRequest.partition_token|partition_token} is
|
|
299
|
+
* set, {@link protos.google.spanner.v1.ExecuteSqlRequest.query_mode|query_mode} can only
|
|
300
|
+
* be set to
|
|
301
|
+
* {@link protos.google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL|QueryMode.NORMAL}.
|
|
300
302
|
* @param {Buffer} request.partitionToken
|
|
301
303
|
* If present, results will be restricted to the specified partition
|
|
302
304
|
* previously created using PartitionQuery(). There must be an exact
|
|
@@ -317,18 +319,19 @@ export declare class SpannerClient {
|
|
|
317
319
|
* Query optimizer configuration to use for the given query.
|
|
318
320
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
319
321
|
* Common options for this request.
|
|
322
|
+
* @param {google.spanner.v1.DirectedReadOptions} request.directedReadOptions
|
|
323
|
+
* Directed read options for this request.
|
|
320
324
|
* @param {boolean} request.dataBoostEnabled
|
|
321
325
|
* If this is for a partitioned query and this field is set to `true`, the
|
|
322
|
-
* request
|
|
326
|
+
* request is executed with Spanner Data Boost independent compute resources.
|
|
323
327
|
*
|
|
324
328
|
* If the field is set to `true` but the request does not set
|
|
325
|
-
* `partition_token`, the API
|
|
329
|
+
* `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
326
330
|
* @param {object} [options]
|
|
327
331
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
328
332
|
* @returns {Promise} - The promise which resolves to an array.
|
|
329
|
-
* The first element of the array is an object representing {@link google.spanner.v1.ResultSet
|
|
330
|
-
* Please see the
|
|
331
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
333
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.ResultSet|ResultSet}.
|
|
334
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
332
335
|
* for more details and examples.
|
|
333
336
|
*/
|
|
334
337
|
executeSql(request?: protos.google.spanner.v1.IExecuteSqlRequest, options?: CallOptions): Promise<[
|
|
@@ -341,12 +344,13 @@ export declare class SpannerClient {
|
|
|
341
344
|
/**
|
|
342
345
|
* Executes a batch of SQL DML statements. This method allows many statements
|
|
343
346
|
* to be run with lower latency than submitting them sequentially with
|
|
344
|
-
* {@link google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}.
|
|
347
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}.
|
|
345
348
|
*
|
|
346
349
|
* Statements are executed in sequential order. A request can succeed even if
|
|
347
|
-
* a statement fails. The
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
+
* a statement fails. The
|
|
351
|
+
* {@link protos.google.spanner.v1.ExecuteBatchDmlResponse.status|ExecuteBatchDmlResponse.status}
|
|
352
|
+
* field in the response provides information about the statement that failed.
|
|
353
|
+
* Clients must inspect this field to determine whether an error occurred.
|
|
350
354
|
*
|
|
351
355
|
* Execution stops after the first failed statement; the remaining statements
|
|
352
356
|
* are not executed.
|
|
@@ -362,16 +366,16 @@ export declare class SpannerClient {
|
|
|
362
366
|
* caller must either supply an existing transaction ID or begin a new
|
|
363
367
|
* transaction.
|
|
364
368
|
* @param {number[]} request.statements
|
|
365
|
-
* Required. The list of statements to execute in this batch. Statements are
|
|
366
|
-
* serially, such that the effects of statement `i` are visible to
|
|
367
|
-
* `i+1`. Each statement must be a DML statement. Execution stops at
|
|
368
|
-
* first failed statement; the remaining statements are not executed.
|
|
369
|
+
* Required. The list of statements to execute in this batch. Statements are
|
|
370
|
+
* executed serially, such that the effects of statement `i` are visible to
|
|
371
|
+
* statement `i+1`. Each statement must be a DML statement. Execution stops at
|
|
372
|
+
* the first failed statement; the remaining statements are not executed.
|
|
369
373
|
*
|
|
370
374
|
* Callers must provide at least one statement.
|
|
371
375
|
* @param {number} request.seqno
|
|
372
|
-
* Required. A per-transaction sequence number used to identify this request.
|
|
373
|
-
* makes each request idempotent such that if the request is
|
|
374
|
-
* times, at most one will succeed.
|
|
376
|
+
* Required. A per-transaction sequence number used to identify this request.
|
|
377
|
+
* This field makes each request idempotent such that if the request is
|
|
378
|
+
* received multiple times, at most one will succeed.
|
|
375
379
|
*
|
|
376
380
|
* The sequence number must be monotonically increasing within the
|
|
377
381
|
* transaction. If a request arrives for the first time with an out-of-order
|
|
@@ -382,9 +386,8 @@ export declare class SpannerClient {
|
|
|
382
386
|
* @param {object} [options]
|
|
383
387
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
384
388
|
* @returns {Promise} - The promise which resolves to an array.
|
|
385
|
-
* The first element of the array is an object representing {@link google.spanner.v1.ExecuteBatchDmlResponse
|
|
386
|
-
* Please see the
|
|
387
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
389
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.ExecuteBatchDmlResponse|ExecuteBatchDmlResponse}.
|
|
390
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
388
391
|
* for more details and examples.
|
|
389
392
|
*/
|
|
390
393
|
executeBatchDml(request?: protos.google.spanner.v1.IExecuteBatchDmlRequest, options?: CallOptions): Promise<[
|
|
@@ -397,17 +400,18 @@ export declare class SpannerClient {
|
|
|
397
400
|
/**
|
|
398
401
|
* Reads rows from the database using key lookups and scans, as a
|
|
399
402
|
* simple key/value style alternative to
|
|
400
|
-
* {@link google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}. This method cannot be
|
|
401
|
-
* return a result set larger than 10 MiB; if the read matches more
|
|
403
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}. This method cannot be
|
|
404
|
+
* used to return a result set larger than 10 MiB; if the read matches more
|
|
402
405
|
* data than that, the read fails with a `FAILED_PRECONDITION`
|
|
403
406
|
* error.
|
|
404
407
|
*
|
|
405
408
|
* Reads inside read-write transactions might return `ABORTED`. If
|
|
406
409
|
* this occurs, the application should restart the transaction from
|
|
407
|
-
* the beginning. See {@link google.spanner.v1.Transaction|Transaction} for more
|
|
410
|
+
* the beginning. See {@link protos.google.spanner.v1.Transaction|Transaction} for more
|
|
411
|
+
* details.
|
|
408
412
|
*
|
|
409
413
|
* Larger result sets can be yielded in streaming fashion by calling
|
|
410
|
-
* {@link google.spanner.v1.Spanner.StreamingRead|StreamingRead} instead.
|
|
414
|
+
* {@link protos.google.spanner.v1.Spanner.StreamingRead|StreamingRead} instead.
|
|
411
415
|
*
|
|
412
416
|
* @param {Object} request
|
|
413
417
|
* The request object that will be sent.
|
|
@@ -419,22 +423,29 @@ export declare class SpannerClient {
|
|
|
419
423
|
* @param {string} request.table
|
|
420
424
|
* Required. The name of the table in the database to be read.
|
|
421
425
|
* @param {string} request.index
|
|
422
|
-
* If non-empty, the name of an index on
|
|
423
|
-
*
|
|
424
|
-
*
|
|
426
|
+
* If non-empty, the name of an index on
|
|
427
|
+
* {@link protos.google.spanner.v1.ReadRequest.table|table}. This index is used instead of
|
|
428
|
+
* the table primary key when interpreting
|
|
429
|
+
* {@link protos.google.spanner.v1.ReadRequest.key_set|key_set} and sorting result rows.
|
|
430
|
+
* See {@link protos.google.spanner.v1.ReadRequest.key_set|key_set} for further
|
|
431
|
+
* information.
|
|
425
432
|
* @param {string[]} request.columns
|
|
426
|
-
* Required. The columns of {@link google.spanner.v1.ReadRequest.table|table} to be
|
|
427
|
-
* this request.
|
|
433
|
+
* Required. The columns of {@link protos.google.spanner.v1.ReadRequest.table|table} to be
|
|
434
|
+
* returned for each row matching this request.
|
|
428
435
|
* @param {google.spanner.v1.KeySet} request.keySet
|
|
429
436
|
* Required. `key_set` identifies the rows to be yielded. `key_set` names the
|
|
430
|
-
* primary keys of the rows in {@link google.spanner.v1.ReadRequest.table|table} to
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* empty, rows
|
|
437
|
+
* primary keys of the rows in {@link protos.google.spanner.v1.ReadRequest.table|table} to
|
|
438
|
+
* be yielded, unless {@link protos.google.spanner.v1.ReadRequest.index|index} is present.
|
|
439
|
+
* If {@link protos.google.spanner.v1.ReadRequest.index|index} is present, then
|
|
440
|
+
* {@link protos.google.spanner.v1.ReadRequest.key_set|key_set} instead names index keys
|
|
441
|
+
* in {@link protos.google.spanner.v1.ReadRequest.index|index}.
|
|
442
|
+
*
|
|
443
|
+
* If the {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token}
|
|
444
|
+
* field is empty, rows are yielded in table primary key order (if
|
|
445
|
+
* {@link protos.google.spanner.v1.ReadRequest.index|index} is empty) or index key order
|
|
446
|
+
* (if {@link protos.google.spanner.v1.ReadRequest.index|index} is non-empty). If the
|
|
447
|
+
* {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} field is
|
|
448
|
+
* not empty, rows will be yielded in an unspecified order.
|
|
438
449
|
*
|
|
439
450
|
* It is not an error for the `key_set` to name rows that do not
|
|
440
451
|
* exist in the database. Read yields nothing for nonexistent rows.
|
|
@@ -445,9 +456,9 @@ export declare class SpannerClient {
|
|
|
445
456
|
* @param {Buffer} request.resumeToken
|
|
446
457
|
* If this request is resuming a previously interrupted read,
|
|
447
458
|
* `resume_token` should be copied from the last
|
|
448
|
-
* {@link google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
449
|
-
* enables the new read to resume where the last read
|
|
450
|
-
* rest of the request parameters must exactly match the request
|
|
459
|
+
* {@link protos.google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
460
|
+
* interruption. Doing this enables the new read to resume where the last read
|
|
461
|
+
* left off. The rest of the request parameters must exactly match the request
|
|
451
462
|
* that yielded this token.
|
|
452
463
|
* @param {Buffer} request.partitionToken
|
|
453
464
|
* If present, results will be restricted to the specified partition
|
|
@@ -456,18 +467,19 @@ export declare class SpannerClient {
|
|
|
456
467
|
* PartitionReadRequest message used to create this partition_token.
|
|
457
468
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
458
469
|
* Common options for this request.
|
|
470
|
+
* @param {google.spanner.v1.DirectedReadOptions} request.directedReadOptions
|
|
471
|
+
* Directed read options for this request.
|
|
459
472
|
* @param {boolean} request.dataBoostEnabled
|
|
460
473
|
* If this is for a partitioned read and this field is set to `true`, the
|
|
461
|
-
* request
|
|
474
|
+
* request is executed with Spanner Data Boost independent compute resources.
|
|
462
475
|
*
|
|
463
476
|
* If the field is set to `true` but the request does not set
|
|
464
|
-
* `partition_token`, the API
|
|
477
|
+
* `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
465
478
|
* @param {object} [options]
|
|
466
479
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
467
480
|
* @returns {Promise} - The promise which resolves to an array.
|
|
468
|
-
* The first element of the array is an object representing {@link google.spanner.v1.ResultSet
|
|
469
|
-
* Please see the
|
|
470
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
481
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.ResultSet|ResultSet}.
|
|
482
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
471
483
|
* for more details and examples.
|
|
472
484
|
*/
|
|
473
485
|
read(request?: protos.google.spanner.v1.IReadRequest, options?: CallOptions): Promise<[
|
|
@@ -479,8 +491,9 @@ export declare class SpannerClient {
|
|
|
479
491
|
read(request: protos.google.spanner.v1.IReadRequest, callback: Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined>): void;
|
|
480
492
|
/**
|
|
481
493
|
* Begins a new transaction. This step can often be skipped:
|
|
482
|
-
* {@link google.spanner.v1.Spanner.Read|Read},
|
|
483
|
-
* {@link google.spanner.v1.Spanner.
|
|
494
|
+
* {@link protos.google.spanner.v1.Spanner.Read|Read},
|
|
495
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql} and
|
|
496
|
+
* {@link protos.google.spanner.v1.Spanner.Commit|Commit} can begin a new transaction as a
|
|
484
497
|
* side-effect.
|
|
485
498
|
*
|
|
486
499
|
* @param {Object} request
|
|
@@ -498,9 +511,8 @@ export declare class SpannerClient {
|
|
|
498
511
|
* @param {object} [options]
|
|
499
512
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
500
513
|
* @returns {Promise} - The promise which resolves to an array.
|
|
501
|
-
* The first element of the array is an object representing {@link google.spanner.v1.Transaction
|
|
502
|
-
* Please see the
|
|
503
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
514
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.Transaction|Transaction}.
|
|
515
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
504
516
|
* for more details and examples.
|
|
505
517
|
*/
|
|
506
518
|
beginTransaction(request?: protos.google.spanner.v1.IBeginTransactionRequest, options?: CallOptions): Promise<[
|
|
@@ -540,24 +552,23 @@ export declare class SpannerClient {
|
|
|
540
552
|
* instance, due to retries in the application, or in the
|
|
541
553
|
* transport library), it is possible that the mutations are
|
|
542
554
|
* executed more than once. If this is undesirable, use
|
|
543
|
-
* {@link google.spanner.v1.Spanner.BeginTransaction|BeginTransaction} and
|
|
544
|
-
* {@link google.spanner.v1.Spanner.Commit|Commit} instead.
|
|
555
|
+
* {@link protos.google.spanner.v1.Spanner.BeginTransaction|BeginTransaction} and
|
|
556
|
+
* {@link protos.google.spanner.v1.Spanner.Commit|Commit} instead.
|
|
545
557
|
* @param {number[]} request.mutations
|
|
546
558
|
* The mutations to be executed when this transaction commits. All
|
|
547
559
|
* mutations are applied atomically, in the order they appear in
|
|
548
560
|
* this list.
|
|
549
561
|
* @param {boolean} request.returnCommitStats
|
|
550
562
|
* If `true`, then statistics related to the transaction will be included in
|
|
551
|
-
* the {@link google.spanner.v1.CommitResponse.commit_stats|CommitResponse}.
|
|
552
|
-
* `false`.
|
|
563
|
+
* the {@link protos.google.spanner.v1.CommitResponse.commit_stats|CommitResponse}.
|
|
564
|
+
* Default value is `false`.
|
|
553
565
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
554
566
|
* Common options for this request.
|
|
555
567
|
* @param {object} [options]
|
|
556
568
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
557
569
|
* @returns {Promise} - The promise which resolves to an array.
|
|
558
|
-
* The first element of the array is an object representing {@link google.spanner.v1.CommitResponse
|
|
559
|
-
* Please see the
|
|
560
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
570
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.CommitResponse|CommitResponse}.
|
|
571
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
561
572
|
* for more details and examples.
|
|
562
573
|
*/
|
|
563
574
|
commit(request?: protos.google.spanner.v1.ICommitRequest, options?: CallOptions): Promise<[
|
|
@@ -570,8 +581,9 @@ export declare class SpannerClient {
|
|
|
570
581
|
/**
|
|
571
582
|
* Rolls back a transaction, releasing any locks it holds. It is a good
|
|
572
583
|
* idea to call this for any transaction that includes one or more
|
|
573
|
-
* {@link google.spanner.v1.Spanner.Read|Read} or
|
|
574
|
-
*
|
|
584
|
+
* {@link protos.google.spanner.v1.Spanner.Read|Read} or
|
|
585
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql} requests and ultimately
|
|
586
|
+
* decides not to commit.
|
|
575
587
|
*
|
|
576
588
|
* `Rollback` returns `OK` if it successfully aborts the transaction, the
|
|
577
589
|
* transaction was already aborted, or the transaction is not
|
|
@@ -586,9 +598,8 @@ export declare class SpannerClient {
|
|
|
586
598
|
* @param {object} [options]
|
|
587
599
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
588
600
|
* @returns {Promise} - The promise which resolves to an array.
|
|
589
|
-
* The first element of the array is an object representing {@link google.protobuf.Empty
|
|
590
|
-
* Please see the
|
|
591
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
601
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
602
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
592
603
|
* for more details and examples.
|
|
593
604
|
*/
|
|
594
605
|
rollback(request?: protos.google.spanner.v1.IRollbackRequest, options?: CallOptions): Promise<[
|
|
@@ -601,10 +612,11 @@ export declare class SpannerClient {
|
|
|
601
612
|
/**
|
|
602
613
|
* Creates a set of partition tokens that can be used to execute a query
|
|
603
614
|
* operation in parallel. Each of the returned partition tokens can be used
|
|
604
|
-
* by {@link google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql} to
|
|
605
|
-
* of the query result to read. The same session and
|
|
606
|
-
* must be used by the PartitionQueryRequest used to
|
|
607
|
-
* partition tokens and the ExecuteSqlRequests that use the
|
|
615
|
+
* by {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql} to
|
|
616
|
+
* specify a subset of the query result to read. The same session and
|
|
617
|
+
* read-only transaction must be used by the PartitionQueryRequest used to
|
|
618
|
+
* create the partition tokens and the ExecuteSqlRequests that use the
|
|
619
|
+
* partition tokens.
|
|
608
620
|
*
|
|
609
621
|
* Partition tokens become invalid when the session used to create them
|
|
610
622
|
* is deleted, is idle for too long, begins a new transaction, or becomes too
|
|
@@ -619,15 +631,16 @@ export declare class SpannerClient {
|
|
|
619
631
|
* Read only snapshot transactions are supported, read/write and single use
|
|
620
632
|
* transactions are not.
|
|
621
633
|
* @param {string} request.sql
|
|
622
|
-
* Required. The query request to generate partitions for. The request will
|
|
623
|
-
* the query is not root partitionable.
|
|
624
|
-
* partitionable
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
* DELETE. Use
|
|
634
|
+
* Required. The query request to generate partitions for. The request will
|
|
635
|
+
* fail if the query is not root partitionable. For a query to be root
|
|
636
|
+
* partitionable, it needs to satisfy a few conditions. For example, the first
|
|
637
|
+
* operator in the query execution plan must be a distributed union operator.
|
|
638
|
+
* For more information about other conditions, see [Read data in
|
|
639
|
+
* parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
|
|
640
|
+
*
|
|
641
|
+
* The query request must not contain DML commands, such as INSERT, UPDATE, or
|
|
642
|
+
* DELETE. Use
|
|
643
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql} with a
|
|
631
644
|
* PartitionedDml transaction for large, partition-friendly DML operations.
|
|
632
645
|
* @param {google.protobuf.Struct} request.params
|
|
633
646
|
* Parameter names and values that bind to placeholders in the SQL string.
|
|
@@ -645,20 +658,20 @@ export declare class SpannerClient {
|
|
|
645
658
|
* @param {number[]} request.paramTypes
|
|
646
659
|
* It is not always possible for Cloud Spanner to infer the right SQL type
|
|
647
660
|
* from a JSON value. For example, values of type `BYTES` and values
|
|
648
|
-
* of type `STRING` both appear in
|
|
661
|
+
* of type `STRING` both appear in
|
|
662
|
+
* {@link protos.google.spanner.v1.PartitionQueryRequest.params|params} as JSON strings.
|
|
649
663
|
*
|
|
650
664
|
* In these cases, `param_types` can be used to specify the exact
|
|
651
665
|
* SQL type for some or all of the SQL query parameters. See the
|
|
652
|
-
* definition of {@link google.spanner.v1.Type|Type} for more information
|
|
666
|
+
* definition of {@link protos.google.spanner.v1.Type|Type} for more information
|
|
653
667
|
* about SQL types.
|
|
654
668
|
* @param {google.spanner.v1.PartitionOptions} request.partitionOptions
|
|
655
669
|
* Additional options that affect how many partitions are created.
|
|
656
670
|
* @param {object} [options]
|
|
657
671
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
658
672
|
* @returns {Promise} - The promise which resolves to an array.
|
|
659
|
-
* The first element of the array is an object representing {@link google.spanner.v1.PartitionResponse
|
|
660
|
-
* Please see the
|
|
661
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
673
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.PartitionResponse|PartitionResponse}.
|
|
674
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
662
675
|
* for more details and examples.
|
|
663
676
|
*/
|
|
664
677
|
partitionQuery(request?: protos.google.spanner.v1.IPartitionQueryRequest, options?: CallOptions): Promise<[
|
|
@@ -671,12 +684,13 @@ export declare class SpannerClient {
|
|
|
671
684
|
/**
|
|
672
685
|
* Creates a set of partition tokens that can be used to execute a read
|
|
673
686
|
* operation in parallel. Each of the returned partition tokens can be used
|
|
674
|
-
* by {@link google.spanner.v1.Spanner.StreamingRead|StreamingRead} to specify a
|
|
675
|
-
* result to read. The same session and read-only
|
|
676
|
-
* the PartitionReadRequest used to create the
|
|
677
|
-
* ReadRequests that use the partition tokens. There
|
|
678
|
-
* guarantees on rows returned among the returned partition
|
|
679
|
-
* within each individual StreamingRead call issued with a
|
|
687
|
+
* by {@link protos.google.spanner.v1.Spanner.StreamingRead|StreamingRead} to specify a
|
|
688
|
+
* subset of the read result to read. The same session and read-only
|
|
689
|
+
* transaction must be used by the PartitionReadRequest used to create the
|
|
690
|
+
* partition tokens and the ReadRequests that use the partition tokens. There
|
|
691
|
+
* are no ordering guarantees on rows returned among the returned partition
|
|
692
|
+
* tokens, or even within each individual StreamingRead call issued with a
|
|
693
|
+
* partition_token.
|
|
680
694
|
*
|
|
681
695
|
* Partition tokens become invalid when the session used to create them
|
|
682
696
|
* is deleted, is idle for too long, begins a new transaction, or becomes too
|
|
@@ -693,17 +707,23 @@ export declare class SpannerClient {
|
|
|
693
707
|
* @param {string} request.table
|
|
694
708
|
* Required. The name of the table in the database to be read.
|
|
695
709
|
* @param {string} request.index
|
|
696
|
-
* If non-empty, the name of an index on
|
|
697
|
-
*
|
|
698
|
-
*
|
|
710
|
+
* If non-empty, the name of an index on
|
|
711
|
+
* {@link protos.google.spanner.v1.PartitionReadRequest.table|table}. This index is used
|
|
712
|
+
* instead of the table primary key when interpreting
|
|
713
|
+
* {@link protos.google.spanner.v1.PartitionReadRequest.key_set|key_set} and sorting
|
|
714
|
+
* result rows. See {@link protos.google.spanner.v1.PartitionReadRequest.key_set|key_set}
|
|
715
|
+
* for further information.
|
|
699
716
|
* @param {string[]} request.columns
|
|
700
|
-
* The columns of {@link google.spanner.v1.PartitionReadRequest.table|table} to be
|
|
701
|
-
* this request.
|
|
717
|
+
* The columns of {@link protos.google.spanner.v1.PartitionReadRequest.table|table} to be
|
|
718
|
+
* returned for each row matching this request.
|
|
702
719
|
* @param {google.spanner.v1.KeySet} request.keySet
|
|
703
720
|
* Required. `key_set` identifies the rows to be yielded. `key_set` names the
|
|
704
|
-
* primary keys of the rows in
|
|
705
|
-
*
|
|
706
|
-
*
|
|
721
|
+
* primary keys of the rows in
|
|
722
|
+
* {@link protos.google.spanner.v1.PartitionReadRequest.table|table} to be yielded, unless
|
|
723
|
+
* {@link protos.google.spanner.v1.PartitionReadRequest.index|index} is present. If
|
|
724
|
+
* {@link protos.google.spanner.v1.PartitionReadRequest.index|index} is present, then
|
|
725
|
+
* {@link protos.google.spanner.v1.PartitionReadRequest.key_set|key_set} instead names
|
|
726
|
+
* index keys in {@link protos.google.spanner.v1.PartitionReadRequest.index|index}.
|
|
707
727
|
*
|
|
708
728
|
* It is not an error for the `key_set` to name rows that do not
|
|
709
729
|
* exist in the database. Read yields nothing for nonexistent rows.
|
|
@@ -712,9 +732,8 @@ export declare class SpannerClient {
|
|
|
712
732
|
* @param {object} [options]
|
|
713
733
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
714
734
|
* @returns {Promise} - The promise which resolves to an array.
|
|
715
|
-
* The first element of the array is an object representing {@link google.spanner.v1.PartitionResponse
|
|
716
|
-
* Please see the
|
|
717
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
735
|
+
* The first element of the array is an object representing {@link protos.google.spanner.v1.PartitionResponse|PartitionResponse}.
|
|
736
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
718
737
|
* for more details and examples.
|
|
719
738
|
*/
|
|
720
739
|
partitionRead(request?: protos.google.spanner.v1.IPartitionReadRequest, options?: CallOptions): Promise<[
|
|
@@ -725,11 +744,11 @@ export declare class SpannerClient {
|
|
|
725
744
|
partitionRead(request: protos.google.spanner.v1.IPartitionReadRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined>): void;
|
|
726
745
|
partitionRead(request: protos.google.spanner.v1.IPartitionReadRequest, callback: Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined>): void;
|
|
727
746
|
/**
|
|
728
|
-
* Like {@link google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}, except returns the
|
|
729
|
-
* set as a stream. Unlike
|
|
730
|
-
* is no limit on
|
|
731
|
-
*
|
|
732
|
-
* column value can exceed 10 MiB.
|
|
747
|
+
* Like {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}, except returns the
|
|
748
|
+
* result set as a stream. Unlike
|
|
749
|
+
* {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}, there is no limit on
|
|
750
|
+
* the size of the returned result set. However, no individual row in the
|
|
751
|
+
* result set can exceed 100 MiB, and no column value can exceed 10 MiB.
|
|
733
752
|
*
|
|
734
753
|
* @param {Object} request
|
|
735
754
|
* The request object that will be sent.
|
|
@@ -765,23 +784,27 @@ export declare class SpannerClient {
|
|
|
765
784
|
* @param {number[]} request.paramTypes
|
|
766
785
|
* It is not always possible for Cloud Spanner to infer the right SQL type
|
|
767
786
|
* from a JSON value. For example, values of type `BYTES` and values
|
|
768
|
-
* of type `STRING` both appear in
|
|
787
|
+
* of type `STRING` both appear in
|
|
788
|
+
* {@link protos.google.spanner.v1.ExecuteSqlRequest.params|params} as JSON strings.
|
|
769
789
|
*
|
|
770
790
|
* In these cases, `param_types` can be used to specify the exact
|
|
771
791
|
* SQL type for some or all of the SQL statement parameters. See the
|
|
772
|
-
* definition of {@link google.spanner.v1.Type|Type} for more information
|
|
792
|
+
* definition of {@link protos.google.spanner.v1.Type|Type} for more information
|
|
773
793
|
* about SQL types.
|
|
774
794
|
* @param {Buffer} request.resumeToken
|
|
775
795
|
* If this request is resuming a previously interrupted SQL statement
|
|
776
796
|
* execution, `resume_token` should be copied from the last
|
|
777
|
-
* {@link google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
778
|
-
* enables the new SQL statement execution to resume
|
|
779
|
-
* off. The rest of the request parameters must
|
|
780
|
-
* request that yielded this token.
|
|
797
|
+
* {@link protos.google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
798
|
+
* interruption. Doing this enables the new SQL statement execution to resume
|
|
799
|
+
* where the last one left off. The rest of the request parameters must
|
|
800
|
+
* exactly match the request that yielded this token.
|
|
781
801
|
* @param {google.spanner.v1.ExecuteSqlRequest.QueryMode} request.queryMode
|
|
782
802
|
* Used to control the amount of debugging information returned in
|
|
783
|
-
* {@link google.spanner.v1.ResultSetStats|ResultSetStats}. If
|
|
784
|
-
*
|
|
803
|
+
* {@link protos.google.spanner.v1.ResultSetStats|ResultSetStats}. If
|
|
804
|
+
* {@link protos.google.spanner.v1.ExecuteSqlRequest.partition_token|partition_token} is
|
|
805
|
+
* set, {@link protos.google.spanner.v1.ExecuteSqlRequest.query_mode|query_mode} can only
|
|
806
|
+
* be set to
|
|
807
|
+
* {@link protos.google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL|QueryMode.NORMAL}.
|
|
785
808
|
* @param {Buffer} request.partitionToken
|
|
786
809
|
* If present, results will be restricted to the specified partition
|
|
787
810
|
* previously created using PartitionQuery(). There must be an exact
|
|
@@ -802,25 +825,26 @@ export declare class SpannerClient {
|
|
|
802
825
|
* Query optimizer configuration to use for the given query.
|
|
803
826
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
804
827
|
* Common options for this request.
|
|
828
|
+
* @param {google.spanner.v1.DirectedReadOptions} request.directedReadOptions
|
|
829
|
+
* Directed read options for this request.
|
|
805
830
|
* @param {boolean} request.dataBoostEnabled
|
|
806
831
|
* If this is for a partitioned query and this field is set to `true`, the
|
|
807
|
-
* request
|
|
832
|
+
* request is executed with Spanner Data Boost independent compute resources.
|
|
808
833
|
*
|
|
809
834
|
* If the field is set to `true` but the request does not set
|
|
810
|
-
* `partition_token`, the API
|
|
835
|
+
* `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
811
836
|
* @param {object} [options]
|
|
812
837
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
813
838
|
* @returns {Stream}
|
|
814
|
-
* An object stream which emits {@link google.spanner.v1.PartialResultSet
|
|
815
|
-
* Please see the
|
|
816
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming)
|
|
839
|
+
* An object stream which emits {@link protos.google.spanner.v1.PartialResultSet|PartialResultSet} on 'data' event.
|
|
840
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation }
|
|
817
841
|
* for more details and examples.
|
|
818
842
|
*/
|
|
819
843
|
executeStreamingSql(request?: protos.google.spanner.v1.IExecuteSqlRequest, options?: CallOptions): gax.CancellableStream;
|
|
820
844
|
/**
|
|
821
|
-
* Like {@link google.spanner.v1.Spanner.Read|Read}, except returns the result set
|
|
822
|
-
* stream. Unlike {@link google.spanner.v1.Spanner.Read|Read}, there is no
|
|
823
|
-
* size of the returned result set. However, no individual row in
|
|
845
|
+
* Like {@link protos.google.spanner.v1.Spanner.Read|Read}, except returns the result set
|
|
846
|
+
* as a stream. Unlike {@link protos.google.spanner.v1.Spanner.Read|Read}, there is no
|
|
847
|
+
* limit on the size of the returned result set. However, no individual row in
|
|
824
848
|
* the result set can exceed 100 MiB, and no column value can exceed
|
|
825
849
|
* 10 MiB.
|
|
826
850
|
*
|
|
@@ -834,22 +858,29 @@ export declare class SpannerClient {
|
|
|
834
858
|
* @param {string} request.table
|
|
835
859
|
* Required. The name of the table in the database to be read.
|
|
836
860
|
* @param {string} request.index
|
|
837
|
-
* If non-empty, the name of an index on
|
|
838
|
-
*
|
|
839
|
-
*
|
|
861
|
+
* If non-empty, the name of an index on
|
|
862
|
+
* {@link protos.google.spanner.v1.ReadRequest.table|table}. This index is used instead of
|
|
863
|
+
* the table primary key when interpreting
|
|
864
|
+
* {@link protos.google.spanner.v1.ReadRequest.key_set|key_set} and sorting result rows.
|
|
865
|
+
* See {@link protos.google.spanner.v1.ReadRequest.key_set|key_set} for further
|
|
866
|
+
* information.
|
|
840
867
|
* @param {string[]} request.columns
|
|
841
|
-
* Required. The columns of {@link google.spanner.v1.ReadRequest.table|table} to be
|
|
842
|
-
* this request.
|
|
868
|
+
* Required. The columns of {@link protos.google.spanner.v1.ReadRequest.table|table} to be
|
|
869
|
+
* returned for each row matching this request.
|
|
843
870
|
* @param {google.spanner.v1.KeySet} request.keySet
|
|
844
871
|
* Required. `key_set` identifies the rows to be yielded. `key_set` names the
|
|
845
|
-
* primary keys of the rows in {@link google.spanner.v1.ReadRequest.table|table} to
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
* empty, rows
|
|
872
|
+
* primary keys of the rows in {@link protos.google.spanner.v1.ReadRequest.table|table} to
|
|
873
|
+
* be yielded, unless {@link protos.google.spanner.v1.ReadRequest.index|index} is present.
|
|
874
|
+
* If {@link protos.google.spanner.v1.ReadRequest.index|index} is present, then
|
|
875
|
+
* {@link protos.google.spanner.v1.ReadRequest.key_set|key_set} instead names index keys
|
|
876
|
+
* in {@link protos.google.spanner.v1.ReadRequest.index|index}.
|
|
877
|
+
*
|
|
878
|
+
* If the {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token}
|
|
879
|
+
* field is empty, rows are yielded in table primary key order (if
|
|
880
|
+
* {@link protos.google.spanner.v1.ReadRequest.index|index} is empty) or index key order
|
|
881
|
+
* (if {@link protos.google.spanner.v1.ReadRequest.index|index} is non-empty). If the
|
|
882
|
+
* {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} field is
|
|
883
|
+
* not empty, rows will be yielded in an unspecified order.
|
|
853
884
|
*
|
|
854
885
|
* It is not an error for the `key_set` to name rows that do not
|
|
855
886
|
* exist in the database. Read yields nothing for nonexistent rows.
|
|
@@ -860,9 +891,9 @@ export declare class SpannerClient {
|
|
|
860
891
|
* @param {Buffer} request.resumeToken
|
|
861
892
|
* If this request is resuming a previously interrupted read,
|
|
862
893
|
* `resume_token` should be copied from the last
|
|
863
|
-
* {@link google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
864
|
-
* enables the new read to resume where the last read
|
|
865
|
-
* rest of the request parameters must exactly match the request
|
|
894
|
+
* {@link protos.google.spanner.v1.PartialResultSet|PartialResultSet} yielded before the
|
|
895
|
+
* interruption. Doing this enables the new read to resume where the last read
|
|
896
|
+
* left off. The rest of the request parameters must exactly match the request
|
|
866
897
|
* that yielded this token.
|
|
867
898
|
* @param {Buffer} request.partitionToken
|
|
868
899
|
* If present, results will be restricted to the specified partition
|
|
@@ -871,21 +902,55 @@ export declare class SpannerClient {
|
|
|
871
902
|
* PartitionReadRequest message used to create this partition_token.
|
|
872
903
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
873
904
|
* Common options for this request.
|
|
905
|
+
* @param {google.spanner.v1.DirectedReadOptions} request.directedReadOptions
|
|
906
|
+
* Directed read options for this request.
|
|
874
907
|
* @param {boolean} request.dataBoostEnabled
|
|
875
908
|
* If this is for a partitioned read and this field is set to `true`, the
|
|
876
|
-
* request
|
|
909
|
+
* request is executed with Spanner Data Boost independent compute resources.
|
|
877
910
|
*
|
|
878
911
|
* If the field is set to `true` but the request does not set
|
|
879
|
-
* `partition_token`, the API
|
|
912
|
+
* `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
880
913
|
* @param {object} [options]
|
|
881
914
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
882
915
|
* @returns {Stream}
|
|
883
|
-
* An object stream which emits {@link google.spanner.v1.PartialResultSet
|
|
884
|
-
* Please see the
|
|
885
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming)
|
|
916
|
+
* An object stream which emits {@link protos.google.spanner.v1.PartialResultSet|PartialResultSet} on 'data' event.
|
|
917
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation }
|
|
886
918
|
* for more details and examples.
|
|
887
919
|
*/
|
|
888
920
|
streamingRead(request?: protos.google.spanner.v1.IReadRequest, options?: CallOptions): gax.CancellableStream;
|
|
921
|
+
/**
|
|
922
|
+
* Batches the supplied mutation groups in a collection of efficient
|
|
923
|
+
* transactions. All mutations in a group are committed atomically. However,
|
|
924
|
+
* mutations across groups can be committed non-atomically in an unspecified
|
|
925
|
+
* order and thus, they must be independent of each other. Partial failure is
|
|
926
|
+
* possible, i.e., some groups may have been committed successfully, while
|
|
927
|
+
* some may have failed. The results of individual batches are streamed into
|
|
928
|
+
* the response as the batches are applied.
|
|
929
|
+
*
|
|
930
|
+
* BatchWrite requests are not replay protected, meaning that each mutation
|
|
931
|
+
* group may be applied more than once. Replays of non-idempotent mutations
|
|
932
|
+
* may have undesirable effects. For example, replays of an insert mutation
|
|
933
|
+
* may produce an already exists error or if you use generated or commit
|
|
934
|
+
* timestamp-based keys, it may result in additional rows being added to the
|
|
935
|
+
* mutation's table. We recommend structuring your mutation groups to be
|
|
936
|
+
* idempotent to avoid this issue.
|
|
937
|
+
*
|
|
938
|
+
* @param {Object} request
|
|
939
|
+
* The request object that will be sent.
|
|
940
|
+
* @param {string} request.session
|
|
941
|
+
* Required. The session in which the batch request is to be run.
|
|
942
|
+
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
943
|
+
* Common options for this request.
|
|
944
|
+
* @param {number[]} request.mutationGroups
|
|
945
|
+
* Required. The groups of mutations to be applied.
|
|
946
|
+
* @param {object} [options]
|
|
947
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
948
|
+
* @returns {Stream}
|
|
949
|
+
* An object stream which emits {@link protos.google.spanner.v1.BatchWriteResponse|BatchWriteResponse} on 'data' event.
|
|
950
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation }
|
|
951
|
+
* for more details and examples.
|
|
952
|
+
*/
|
|
953
|
+
batchWrite(request?: protos.google.spanner.v1.IBatchWriteRequest, options?: CallOptions): gax.CancellableStream;
|
|
889
954
|
/**
|
|
890
955
|
* Lists all sessions in a given database.
|
|
891
956
|
*
|
|
@@ -898,8 +963,9 @@ export declare class SpannerClient {
|
|
|
898
963
|
* to the server's maximum allowed page size.
|
|
899
964
|
* @param {string} request.pageToken
|
|
900
965
|
* If non-empty, `page_token` should contain a
|
|
901
|
-
* {@link google.spanner.v1.ListSessionsResponse.next_page_token|next_page_token}
|
|
902
|
-
*
|
|
966
|
+
* {@link protos.google.spanner.v1.ListSessionsResponse.next_page_token|next_page_token}
|
|
967
|
+
* from a previous
|
|
968
|
+
* {@link protos.google.spanner.v1.ListSessionsResponse|ListSessionsResponse}.
|
|
903
969
|
* @param {string} request.filter
|
|
904
970
|
* An expression for filtering the results of the request. Filter rules are
|
|
905
971
|
* case insensitive. The fields eligible for filtering are:
|
|
@@ -914,14 +980,13 @@ export declare class SpannerClient {
|
|
|
914
980
|
* @param {object} [options]
|
|
915
981
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
916
982
|
* @returns {Promise} - The promise which resolves to an array.
|
|
917
|
-
* The first element of the array is Array of {@link google.spanner.v1.Session
|
|
983
|
+
* The first element of the array is Array of {@link protos.google.spanner.v1.Session|Session}.
|
|
918
984
|
* The client library will perform auto-pagination by default: it will call the API as many
|
|
919
985
|
* times as needed and will merge results from all the pages into this array.
|
|
920
986
|
* Note that it can affect your quota.
|
|
921
987
|
* We recommend using `listSessionsAsync()`
|
|
922
988
|
* method described below for async iteration which you can stop as needed.
|
|
923
|
-
* Please see the
|
|
924
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
989
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
925
990
|
* for more details and examples.
|
|
926
991
|
*/
|
|
927
992
|
listSessions(request?: protos.google.spanner.v1.IListSessionsRequest, options?: CallOptions): Promise<[
|
|
@@ -942,8 +1007,9 @@ export declare class SpannerClient {
|
|
|
942
1007
|
* to the server's maximum allowed page size.
|
|
943
1008
|
* @param {string} request.pageToken
|
|
944
1009
|
* If non-empty, `page_token` should contain a
|
|
945
|
-
* {@link google.spanner.v1.ListSessionsResponse.next_page_token|next_page_token}
|
|
946
|
-
*
|
|
1010
|
+
* {@link protos.google.spanner.v1.ListSessionsResponse.next_page_token|next_page_token}
|
|
1011
|
+
* from a previous
|
|
1012
|
+
* {@link protos.google.spanner.v1.ListSessionsResponse|ListSessionsResponse}.
|
|
947
1013
|
* @param {string} request.filter
|
|
948
1014
|
* An expression for filtering the results of the request. Filter rules are
|
|
949
1015
|
* case insensitive. The fields eligible for filtering are:
|
|
@@ -958,13 +1024,12 @@ export declare class SpannerClient {
|
|
|
958
1024
|
* @param {object} [options]
|
|
959
1025
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
960
1026
|
* @returns {Stream}
|
|
961
|
-
* An object stream which emits an object representing {@link google.spanner.v1.Session
|
|
1027
|
+
* An object stream which emits an object representing {@link protos.google.spanner.v1.Session|Session} on 'data' event.
|
|
962
1028
|
* The client library will perform auto-pagination by default: it will call the API as many
|
|
963
1029
|
* times as needed. Note that it can affect your quota.
|
|
964
1030
|
* We recommend using `listSessionsAsync()`
|
|
965
1031
|
* method described below for async iteration which you can stop as needed.
|
|
966
|
-
* Please see the
|
|
967
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1032
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
968
1033
|
* for more details and examples.
|
|
969
1034
|
*/
|
|
970
1035
|
listSessionsStream(request?: protos.google.spanner.v1.IListSessionsRequest, options?: CallOptions): Transform;
|
|
@@ -981,8 +1046,9 @@ export declare class SpannerClient {
|
|
|
981
1046
|
* to the server's maximum allowed page size.
|
|
982
1047
|
* @param {string} request.pageToken
|
|
983
1048
|
* If non-empty, `page_token` should contain a
|
|
984
|
-
* {@link google.spanner.v1.ListSessionsResponse.next_page_token|next_page_token}
|
|
985
|
-
*
|
|
1049
|
+
* {@link protos.google.spanner.v1.ListSessionsResponse.next_page_token|next_page_token}
|
|
1050
|
+
* from a previous
|
|
1051
|
+
* {@link protos.google.spanner.v1.ListSessionsResponse|ListSessionsResponse}.
|
|
986
1052
|
* @param {string} request.filter
|
|
987
1053
|
* An expression for filtering the results of the request. Filter rules are
|
|
988
1054
|
* case insensitive. The fields eligible for filtering are:
|
|
@@ -997,12 +1063,11 @@ export declare class SpannerClient {
|
|
|
997
1063
|
* @param {object} [options]
|
|
998
1064
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
999
1065
|
* @returns {Object}
|
|
1000
|
-
* An iterable Object that allows
|
|
1066
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1001
1067
|
* When you iterate the returned iterable, each element will be an object representing
|
|
1002
|
-
* {@link google.spanner.v1.Session
|
|
1068
|
+
* {@link protos.google.spanner.v1.Session|Session}. The API will be called under the hood as needed, once per the page,
|
|
1003
1069
|
* so you can stop the iteration when you don't need more results.
|
|
1004
|
-
* Please see the
|
|
1005
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1070
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1006
1071
|
* for more details and examples.
|
|
1007
1072
|
*/
|
|
1008
1073
|
listSessionsAsync(request?: protos.google.spanner.v1.IListSessionsRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.v1.ISession>;
|