@google-cloud/spanner 8.7.0 → 8.8.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/build/protos/google/spanner/v1/commit_response.proto +16 -0
- package/build/protos/google/spanner/v1/spanner.proto +55 -2
- package/build/protos/google/spanner/v1/transaction.proto +38 -18
- package/build/protos/protos.d.ts +1639 -1473
- package/build/protos/protos.js +21738 -13062
- package/build/protos/protos.json +296 -213
- package/build/src/codec.d.ts +10 -16
- package/build/src/codec.js +337 -68
- package/build/src/common-grpc/service.js +26 -16
- package/build/src/database.js +4 -1
- package/build/src/helper.d.ts +16 -0
- package/build/src/helper.js +89 -0
- package/build/src/index.d.ts +1 -0
- package/build/src/index.js +34 -24
- package/build/src/instance.js +4 -1
- package/build/src/instrument.d.ts +10 -0
- package/build/src/instrument.js +74 -13
- package/build/src/metrics/metrics-tracer-factory.d.ts +1 -1
- package/build/src/metrics/metrics-tracer-factory.js +5 -5
- package/build/src/metrics/metrics-tracer.d.ts +3 -3
- package/build/src/metrics/metrics-tracer.js +6 -6
- package/build/src/multiplexed-session.js +22 -19
- package/build/src/partial-result-stream.d.ts +11 -0
- package/build/src/partial-result-stream.js +79 -12
- package/build/src/request_id_header.js +12 -25
- package/build/src/session-pool.js +37 -34
- package/build/src/session.js +1 -1
- package/build/src/transaction.js +1 -1
- package/build/src/v1/spanner_client.d.ts +47 -4
- package/build/src/v1/spanner_client.js +47 -2
- package/build/src/v1/spanner_client_config.json +4 -0
- package/package.json +3 -11
package/build/protos/protos.json
CHANGED
|
@@ -8374,6 +8374,27 @@
|
|
|
8374
8374
|
"(google.api.method_signature)": "session,mutation_groups"
|
|
8375
8375
|
}
|
|
8376
8376
|
]
|
|
8377
|
+
},
|
|
8378
|
+
"FetchCacheUpdate": {
|
|
8379
|
+
"requestType": "FetchCacheUpdateRequest",
|
|
8380
|
+
"responseType": "CacheUpdate",
|
|
8381
|
+
"responseStream": true,
|
|
8382
|
+
"options": {
|
|
8383
|
+
"(google.api.http).post": "/v1/{database=projects/*/instances/*/databases/*}:cacheUpdate",
|
|
8384
|
+
"(google.api.http).body": "*",
|
|
8385
|
+
"(google.api.method_signature)": "database"
|
|
8386
|
+
},
|
|
8387
|
+
"parsedOptions": [
|
|
8388
|
+
{
|
|
8389
|
+
"(google.api.http)": {
|
|
8390
|
+
"post": "/v1/{database=projects/*/instances/*/databases/*}:cacheUpdate",
|
|
8391
|
+
"body": "*"
|
|
8392
|
+
}
|
|
8393
|
+
},
|
|
8394
|
+
{
|
|
8395
|
+
"(google.api.method_signature)": "database"
|
|
8396
|
+
}
|
|
8397
|
+
]
|
|
8377
8398
|
}
|
|
8378
8399
|
}
|
|
8379
8400
|
},
|
|
@@ -9082,6 +9103,13 @@
|
|
|
9082
9103
|
"options": {
|
|
9083
9104
|
"(google.api.field_behavior)": "OPTIONAL"
|
|
9084
9105
|
}
|
|
9106
|
+
},
|
|
9107
|
+
"routingHint": {
|
|
9108
|
+
"type": "RoutingHint",
|
|
9109
|
+
"id": 5,
|
|
9110
|
+
"options": {
|
|
9111
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9112
|
+
}
|
|
9085
9113
|
}
|
|
9086
9114
|
}
|
|
9087
9115
|
},
|
|
@@ -9137,6 +9165,13 @@
|
|
|
9137
9165
|
"options": {
|
|
9138
9166
|
"(google.api.field_behavior)": "OPTIONAL"
|
|
9139
9167
|
}
|
|
9168
|
+
},
|
|
9169
|
+
"routingHint": {
|
|
9170
|
+
"type": "RoutingHint",
|
|
9171
|
+
"id": 10,
|
|
9172
|
+
"options": {
|
|
9173
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9174
|
+
}
|
|
9140
9175
|
}
|
|
9141
9176
|
}
|
|
9142
9177
|
},
|
|
@@ -9221,6 +9256,32 @@
|
|
|
9221
9256
|
}
|
|
9222
9257
|
}
|
|
9223
9258
|
},
|
|
9259
|
+
"FetchCacheUpdateRequest": {
|
|
9260
|
+
"fields": {
|
|
9261
|
+
"database": {
|
|
9262
|
+
"type": "string",
|
|
9263
|
+
"id": 1,
|
|
9264
|
+
"options": {
|
|
9265
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
9266
|
+
"(google.api.resource_reference).type": "spanner.googleapis.com/Database"
|
|
9267
|
+
}
|
|
9268
|
+
},
|
|
9269
|
+
"maxRecipeCount": {
|
|
9270
|
+
"type": "int32",
|
|
9271
|
+
"id": 2,
|
|
9272
|
+
"options": {
|
|
9273
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9274
|
+
}
|
|
9275
|
+
},
|
|
9276
|
+
"maxRangeCount": {
|
|
9277
|
+
"type": "int32",
|
|
9278
|
+
"id": 3,
|
|
9279
|
+
"options": {
|
|
9280
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9281
|
+
}
|
|
9282
|
+
}
|
|
9283
|
+
}
|
|
9284
|
+
},
|
|
9224
9285
|
"CommitResponse": {
|
|
9225
9286
|
"oneofs": {
|
|
9226
9287
|
"MultiplexedSessionRetry": {
|
|
@@ -9245,229 +9306,31 @@
|
|
|
9245
9306
|
"snapshotTimestamp": {
|
|
9246
9307
|
"type": "google.protobuf.Timestamp",
|
|
9247
9308
|
"id": 5
|
|
9248
|
-
}
|
|
9249
|
-
},
|
|
9250
|
-
"nested": {
|
|
9251
|
-
"CommitStats": {
|
|
9252
|
-
"fields": {
|
|
9253
|
-
"mutationCount": {
|
|
9254
|
-
"type": "int64",
|
|
9255
|
-
"id": 1
|
|
9256
|
-
}
|
|
9257
|
-
}
|
|
9258
|
-
}
|
|
9259
|
-
}
|
|
9260
|
-
},
|
|
9261
|
-
"TransactionOptions": {
|
|
9262
|
-
"oneofs": {
|
|
9263
|
-
"mode": {
|
|
9264
|
-
"oneof": [
|
|
9265
|
-
"readWrite",
|
|
9266
|
-
"partitionedDml",
|
|
9267
|
-
"readOnly"
|
|
9268
|
-
]
|
|
9269
|
-
}
|
|
9270
|
-
},
|
|
9271
|
-
"fields": {
|
|
9272
|
-
"readWrite": {
|
|
9273
|
-
"type": "ReadWrite",
|
|
9274
|
-
"id": 1
|
|
9275
|
-
},
|
|
9276
|
-
"partitionedDml": {
|
|
9277
|
-
"type": "PartitionedDml",
|
|
9278
|
-
"id": 3
|
|
9279
9309
|
},
|
|
9280
|
-
"
|
|
9281
|
-
"type": "
|
|
9282
|
-
"id":
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
"id": 5
|
|
9310
|
+
"cacheUpdate": {
|
|
9311
|
+
"type": "CacheUpdate",
|
|
9312
|
+
"id": 6,
|
|
9313
|
+
"options": {
|
|
9314
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9315
|
+
}
|
|
9287
9316
|
},
|
|
9288
9317
|
"isolationLevel": {
|
|
9289
|
-
"type": "IsolationLevel",
|
|
9290
|
-
"id":
|
|
9318
|
+
"type": "TransactionOptions.IsolationLevel",
|
|
9319
|
+
"id": 7
|
|
9320
|
+
},
|
|
9321
|
+
"readLockMode": {
|
|
9322
|
+
"type": "TransactionOptions.ReadWrite.ReadLockMode",
|
|
9323
|
+
"id": 8
|
|
9291
9324
|
}
|
|
9292
9325
|
},
|
|
9293
9326
|
"nested": {
|
|
9294
|
-
"
|
|
9295
|
-
"fields": {
|
|
9296
|
-
"readLockMode": {
|
|
9297
|
-
"type": "ReadLockMode",
|
|
9298
|
-
"id": 1
|
|
9299
|
-
},
|
|
9300
|
-
"multiplexedSessionPreviousTransactionId": {
|
|
9301
|
-
"type": "bytes",
|
|
9302
|
-
"id": 2,
|
|
9303
|
-
"options": {
|
|
9304
|
-
"(google.api.field_behavior)": "OPTIONAL"
|
|
9305
|
-
}
|
|
9306
|
-
}
|
|
9307
|
-
},
|
|
9308
|
-
"nested": {
|
|
9309
|
-
"ReadLockMode": {
|
|
9310
|
-
"values": {
|
|
9311
|
-
"READ_LOCK_MODE_UNSPECIFIED": 0,
|
|
9312
|
-
"PESSIMISTIC": 1,
|
|
9313
|
-
"OPTIMISTIC": 2
|
|
9314
|
-
}
|
|
9315
|
-
}
|
|
9316
|
-
}
|
|
9317
|
-
},
|
|
9318
|
-
"PartitionedDml": {
|
|
9319
|
-
"fields": {}
|
|
9320
|
-
},
|
|
9321
|
-
"ReadOnly": {
|
|
9322
|
-
"oneofs": {
|
|
9323
|
-
"timestampBound": {
|
|
9324
|
-
"oneof": [
|
|
9325
|
-
"strong",
|
|
9326
|
-
"minReadTimestamp",
|
|
9327
|
-
"maxStaleness",
|
|
9328
|
-
"readTimestamp",
|
|
9329
|
-
"exactStaleness"
|
|
9330
|
-
]
|
|
9331
|
-
}
|
|
9332
|
-
},
|
|
9327
|
+
"CommitStats": {
|
|
9333
9328
|
"fields": {
|
|
9334
|
-
"
|
|
9335
|
-
"type": "
|
|
9329
|
+
"mutationCount": {
|
|
9330
|
+
"type": "int64",
|
|
9336
9331
|
"id": 1
|
|
9337
|
-
},
|
|
9338
|
-
"minReadTimestamp": {
|
|
9339
|
-
"type": "google.protobuf.Timestamp",
|
|
9340
|
-
"id": 2
|
|
9341
|
-
},
|
|
9342
|
-
"maxStaleness": {
|
|
9343
|
-
"type": "google.protobuf.Duration",
|
|
9344
|
-
"id": 3
|
|
9345
|
-
},
|
|
9346
|
-
"readTimestamp": {
|
|
9347
|
-
"type": "google.protobuf.Timestamp",
|
|
9348
|
-
"id": 4
|
|
9349
|
-
},
|
|
9350
|
-
"exactStaleness": {
|
|
9351
|
-
"type": "google.protobuf.Duration",
|
|
9352
|
-
"id": 5
|
|
9353
|
-
},
|
|
9354
|
-
"returnReadTimestamp": {
|
|
9355
|
-
"type": "bool",
|
|
9356
|
-
"id": 6
|
|
9357
9332
|
}
|
|
9358
9333
|
}
|
|
9359
|
-
},
|
|
9360
|
-
"IsolationLevel": {
|
|
9361
|
-
"values": {
|
|
9362
|
-
"ISOLATION_LEVEL_UNSPECIFIED": 0,
|
|
9363
|
-
"SERIALIZABLE": 1,
|
|
9364
|
-
"REPEATABLE_READ": 2
|
|
9365
|
-
}
|
|
9366
|
-
}
|
|
9367
|
-
}
|
|
9368
|
-
},
|
|
9369
|
-
"Transaction": {
|
|
9370
|
-
"fields": {
|
|
9371
|
-
"id": {
|
|
9372
|
-
"type": "bytes",
|
|
9373
|
-
"id": 1
|
|
9374
|
-
},
|
|
9375
|
-
"readTimestamp": {
|
|
9376
|
-
"type": "google.protobuf.Timestamp",
|
|
9377
|
-
"id": 2
|
|
9378
|
-
},
|
|
9379
|
-
"precommitToken": {
|
|
9380
|
-
"type": "MultiplexedSessionPrecommitToken",
|
|
9381
|
-
"id": 3
|
|
9382
|
-
}
|
|
9383
|
-
}
|
|
9384
|
-
},
|
|
9385
|
-
"TransactionSelector": {
|
|
9386
|
-
"oneofs": {
|
|
9387
|
-
"selector": {
|
|
9388
|
-
"oneof": [
|
|
9389
|
-
"singleUse",
|
|
9390
|
-
"id",
|
|
9391
|
-
"begin"
|
|
9392
|
-
]
|
|
9393
|
-
}
|
|
9394
|
-
},
|
|
9395
|
-
"fields": {
|
|
9396
|
-
"singleUse": {
|
|
9397
|
-
"type": "TransactionOptions",
|
|
9398
|
-
"id": 1
|
|
9399
|
-
},
|
|
9400
|
-
"id": {
|
|
9401
|
-
"type": "bytes",
|
|
9402
|
-
"id": 2
|
|
9403
|
-
},
|
|
9404
|
-
"begin": {
|
|
9405
|
-
"type": "TransactionOptions",
|
|
9406
|
-
"id": 3
|
|
9407
|
-
}
|
|
9408
|
-
}
|
|
9409
|
-
},
|
|
9410
|
-
"MultiplexedSessionPrecommitToken": {
|
|
9411
|
-
"fields": {
|
|
9412
|
-
"precommitToken": {
|
|
9413
|
-
"type": "bytes",
|
|
9414
|
-
"id": 1
|
|
9415
|
-
},
|
|
9416
|
-
"seqNum": {
|
|
9417
|
-
"type": "int32",
|
|
9418
|
-
"id": 2
|
|
9419
|
-
}
|
|
9420
|
-
}
|
|
9421
|
-
},
|
|
9422
|
-
"KeyRange": {
|
|
9423
|
-
"oneofs": {
|
|
9424
|
-
"startKeyType": {
|
|
9425
|
-
"oneof": [
|
|
9426
|
-
"startClosed",
|
|
9427
|
-
"startOpen"
|
|
9428
|
-
]
|
|
9429
|
-
},
|
|
9430
|
-
"endKeyType": {
|
|
9431
|
-
"oneof": [
|
|
9432
|
-
"endClosed",
|
|
9433
|
-
"endOpen"
|
|
9434
|
-
]
|
|
9435
|
-
}
|
|
9436
|
-
},
|
|
9437
|
-
"fields": {
|
|
9438
|
-
"startClosed": {
|
|
9439
|
-
"type": "google.protobuf.ListValue",
|
|
9440
|
-
"id": 1
|
|
9441
|
-
},
|
|
9442
|
-
"startOpen": {
|
|
9443
|
-
"type": "google.protobuf.ListValue",
|
|
9444
|
-
"id": 2
|
|
9445
|
-
},
|
|
9446
|
-
"endClosed": {
|
|
9447
|
-
"type": "google.protobuf.ListValue",
|
|
9448
|
-
"id": 3
|
|
9449
|
-
},
|
|
9450
|
-
"endOpen": {
|
|
9451
|
-
"type": "google.protobuf.ListValue",
|
|
9452
|
-
"id": 4
|
|
9453
|
-
}
|
|
9454
|
-
}
|
|
9455
|
-
},
|
|
9456
|
-
"KeySet": {
|
|
9457
|
-
"fields": {
|
|
9458
|
-
"keys": {
|
|
9459
|
-
"rule": "repeated",
|
|
9460
|
-
"type": "google.protobuf.ListValue",
|
|
9461
|
-
"id": 1
|
|
9462
|
-
},
|
|
9463
|
-
"ranges": {
|
|
9464
|
-
"rule": "repeated",
|
|
9465
|
-
"type": "KeyRange",
|
|
9466
|
-
"id": 2
|
|
9467
|
-
},
|
|
9468
|
-
"all": {
|
|
9469
|
-
"type": "bool",
|
|
9470
|
-
"id": 3
|
|
9471
9334
|
}
|
|
9472
9335
|
}
|
|
9473
9336
|
},
|
|
@@ -9825,6 +9688,226 @@
|
|
|
9825
9688
|
"PG_OID": 4
|
|
9826
9689
|
}
|
|
9827
9690
|
},
|
|
9691
|
+
"TransactionOptions": {
|
|
9692
|
+
"oneofs": {
|
|
9693
|
+
"mode": {
|
|
9694
|
+
"oneof": [
|
|
9695
|
+
"readWrite",
|
|
9696
|
+
"partitionedDml",
|
|
9697
|
+
"readOnly"
|
|
9698
|
+
]
|
|
9699
|
+
}
|
|
9700
|
+
},
|
|
9701
|
+
"fields": {
|
|
9702
|
+
"readWrite": {
|
|
9703
|
+
"type": "ReadWrite",
|
|
9704
|
+
"id": 1
|
|
9705
|
+
},
|
|
9706
|
+
"partitionedDml": {
|
|
9707
|
+
"type": "PartitionedDml",
|
|
9708
|
+
"id": 3
|
|
9709
|
+
},
|
|
9710
|
+
"readOnly": {
|
|
9711
|
+
"type": "ReadOnly",
|
|
9712
|
+
"id": 2
|
|
9713
|
+
},
|
|
9714
|
+
"excludeTxnFromChangeStreams": {
|
|
9715
|
+
"type": "bool",
|
|
9716
|
+
"id": 5
|
|
9717
|
+
},
|
|
9718
|
+
"isolationLevel": {
|
|
9719
|
+
"type": "IsolationLevel",
|
|
9720
|
+
"id": 6
|
|
9721
|
+
}
|
|
9722
|
+
},
|
|
9723
|
+
"nested": {
|
|
9724
|
+
"ReadWrite": {
|
|
9725
|
+
"fields": {
|
|
9726
|
+
"readLockMode": {
|
|
9727
|
+
"type": "ReadLockMode",
|
|
9728
|
+
"id": 1
|
|
9729
|
+
},
|
|
9730
|
+
"multiplexedSessionPreviousTransactionId": {
|
|
9731
|
+
"type": "bytes",
|
|
9732
|
+
"id": 2,
|
|
9733
|
+
"options": {
|
|
9734
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9735
|
+
}
|
|
9736
|
+
}
|
|
9737
|
+
},
|
|
9738
|
+
"nested": {
|
|
9739
|
+
"ReadLockMode": {
|
|
9740
|
+
"values": {
|
|
9741
|
+
"READ_LOCK_MODE_UNSPECIFIED": 0,
|
|
9742
|
+
"PESSIMISTIC": 1,
|
|
9743
|
+
"OPTIMISTIC": 2
|
|
9744
|
+
}
|
|
9745
|
+
}
|
|
9746
|
+
}
|
|
9747
|
+
},
|
|
9748
|
+
"PartitionedDml": {
|
|
9749
|
+
"fields": {}
|
|
9750
|
+
},
|
|
9751
|
+
"ReadOnly": {
|
|
9752
|
+
"oneofs": {
|
|
9753
|
+
"timestampBound": {
|
|
9754
|
+
"oneof": [
|
|
9755
|
+
"strong",
|
|
9756
|
+
"minReadTimestamp",
|
|
9757
|
+
"maxStaleness",
|
|
9758
|
+
"readTimestamp",
|
|
9759
|
+
"exactStaleness"
|
|
9760
|
+
]
|
|
9761
|
+
}
|
|
9762
|
+
},
|
|
9763
|
+
"fields": {
|
|
9764
|
+
"strong": {
|
|
9765
|
+
"type": "bool",
|
|
9766
|
+
"id": 1
|
|
9767
|
+
},
|
|
9768
|
+
"minReadTimestamp": {
|
|
9769
|
+
"type": "google.protobuf.Timestamp",
|
|
9770
|
+
"id": 2
|
|
9771
|
+
},
|
|
9772
|
+
"maxStaleness": {
|
|
9773
|
+
"type": "google.protobuf.Duration",
|
|
9774
|
+
"id": 3
|
|
9775
|
+
},
|
|
9776
|
+
"readTimestamp": {
|
|
9777
|
+
"type": "google.protobuf.Timestamp",
|
|
9778
|
+
"id": 4
|
|
9779
|
+
},
|
|
9780
|
+
"exactStaleness": {
|
|
9781
|
+
"type": "google.protobuf.Duration",
|
|
9782
|
+
"id": 5
|
|
9783
|
+
},
|
|
9784
|
+
"returnReadTimestamp": {
|
|
9785
|
+
"type": "bool",
|
|
9786
|
+
"id": 6
|
|
9787
|
+
}
|
|
9788
|
+
}
|
|
9789
|
+
},
|
|
9790
|
+
"IsolationLevel": {
|
|
9791
|
+
"values": {
|
|
9792
|
+
"ISOLATION_LEVEL_UNSPECIFIED": 0,
|
|
9793
|
+
"SERIALIZABLE": 1,
|
|
9794
|
+
"REPEATABLE_READ": 2
|
|
9795
|
+
}
|
|
9796
|
+
}
|
|
9797
|
+
}
|
|
9798
|
+
},
|
|
9799
|
+
"Transaction": {
|
|
9800
|
+
"fields": {
|
|
9801
|
+
"id": {
|
|
9802
|
+
"type": "bytes",
|
|
9803
|
+
"id": 1
|
|
9804
|
+
},
|
|
9805
|
+
"readTimestamp": {
|
|
9806
|
+
"type": "google.protobuf.Timestamp",
|
|
9807
|
+
"id": 2
|
|
9808
|
+
},
|
|
9809
|
+
"precommitToken": {
|
|
9810
|
+
"type": "MultiplexedSessionPrecommitToken",
|
|
9811
|
+
"id": 3
|
|
9812
|
+
},
|
|
9813
|
+
"cacheUpdate": {
|
|
9814
|
+
"type": "CacheUpdate",
|
|
9815
|
+
"id": 5,
|
|
9816
|
+
"options": {
|
|
9817
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9818
|
+
}
|
|
9819
|
+
}
|
|
9820
|
+
}
|
|
9821
|
+
},
|
|
9822
|
+
"TransactionSelector": {
|
|
9823
|
+
"oneofs": {
|
|
9824
|
+
"selector": {
|
|
9825
|
+
"oneof": [
|
|
9826
|
+
"singleUse",
|
|
9827
|
+
"id",
|
|
9828
|
+
"begin"
|
|
9829
|
+
]
|
|
9830
|
+
}
|
|
9831
|
+
},
|
|
9832
|
+
"fields": {
|
|
9833
|
+
"singleUse": {
|
|
9834
|
+
"type": "TransactionOptions",
|
|
9835
|
+
"id": 1
|
|
9836
|
+
},
|
|
9837
|
+
"id": {
|
|
9838
|
+
"type": "bytes",
|
|
9839
|
+
"id": 2
|
|
9840
|
+
},
|
|
9841
|
+
"begin": {
|
|
9842
|
+
"type": "TransactionOptions",
|
|
9843
|
+
"id": 3
|
|
9844
|
+
}
|
|
9845
|
+
}
|
|
9846
|
+
},
|
|
9847
|
+
"MultiplexedSessionPrecommitToken": {
|
|
9848
|
+
"fields": {
|
|
9849
|
+
"precommitToken": {
|
|
9850
|
+
"type": "bytes",
|
|
9851
|
+
"id": 1
|
|
9852
|
+
},
|
|
9853
|
+
"seqNum": {
|
|
9854
|
+
"type": "int32",
|
|
9855
|
+
"id": 2
|
|
9856
|
+
}
|
|
9857
|
+
}
|
|
9858
|
+
},
|
|
9859
|
+
"KeyRange": {
|
|
9860
|
+
"oneofs": {
|
|
9861
|
+
"startKeyType": {
|
|
9862
|
+
"oneof": [
|
|
9863
|
+
"startClosed",
|
|
9864
|
+
"startOpen"
|
|
9865
|
+
]
|
|
9866
|
+
},
|
|
9867
|
+
"endKeyType": {
|
|
9868
|
+
"oneof": [
|
|
9869
|
+
"endClosed",
|
|
9870
|
+
"endOpen"
|
|
9871
|
+
]
|
|
9872
|
+
}
|
|
9873
|
+
},
|
|
9874
|
+
"fields": {
|
|
9875
|
+
"startClosed": {
|
|
9876
|
+
"type": "google.protobuf.ListValue",
|
|
9877
|
+
"id": 1
|
|
9878
|
+
},
|
|
9879
|
+
"startOpen": {
|
|
9880
|
+
"type": "google.protobuf.ListValue",
|
|
9881
|
+
"id": 2
|
|
9882
|
+
},
|
|
9883
|
+
"endClosed": {
|
|
9884
|
+
"type": "google.protobuf.ListValue",
|
|
9885
|
+
"id": 3
|
|
9886
|
+
},
|
|
9887
|
+
"endOpen": {
|
|
9888
|
+
"type": "google.protobuf.ListValue",
|
|
9889
|
+
"id": 4
|
|
9890
|
+
}
|
|
9891
|
+
}
|
|
9892
|
+
},
|
|
9893
|
+
"KeySet": {
|
|
9894
|
+
"fields": {
|
|
9895
|
+
"keys": {
|
|
9896
|
+
"rule": "repeated",
|
|
9897
|
+
"type": "google.protobuf.ListValue",
|
|
9898
|
+
"id": 1
|
|
9899
|
+
},
|
|
9900
|
+
"ranges": {
|
|
9901
|
+
"rule": "repeated",
|
|
9902
|
+
"type": "KeyRange",
|
|
9903
|
+
"id": 2
|
|
9904
|
+
},
|
|
9905
|
+
"all": {
|
|
9906
|
+
"type": "bool",
|
|
9907
|
+
"id": 3
|
|
9908
|
+
}
|
|
9909
|
+
}
|
|
9910
|
+
},
|
|
9828
9911
|
"Mutation": {
|
|
9829
9912
|
"oneofs": {
|
|
9830
9913
|
"operation": {
|
package/build/src/codec.d.ts
CHANGED
|
@@ -288,27 +288,20 @@ export declare class Interval {
|
|
|
288
288
|
*/
|
|
289
289
|
toJSON(): string;
|
|
290
290
|
}
|
|
291
|
+
declare function convertFieldsToJson(fields: Field[], options?: JSONOptions): Json;
|
|
291
292
|
/**
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
* @property {boolean} [wrapStructs=false] Indicates if the structs should be
|
|
296
|
-
* wrapped in Struct wrapper.
|
|
297
|
-
* @property {boolean} [includeNameless=false] Indicates if nameless columns
|
|
298
|
-
* should be included in the result. If true, nameless columns will be
|
|
299
|
-
* assigned the name '_{column_index}'.
|
|
300
|
-
*/
|
|
301
|
-
/**
|
|
302
|
-
* Wherever a row or struct object is returned, it is assigned a "toJSON"
|
|
303
|
-
* function. This function will generate the JSON for that row.
|
|
293
|
+
* Pre-compiles and returns a column-specific decoder function.
|
|
294
|
+
* This function resolves the type switch-case and metadata configuration
|
|
295
|
+
* once, returning a high-performance closure for cell decoding.
|
|
304
296
|
*
|
|
305
297
|
* @private
|
|
306
298
|
*
|
|
307
|
-
* @param {
|
|
308
|
-
* @param {
|
|
309
|
-
* @
|
|
299
|
+
* @param {google.spanner.v1.Type} type The Spanner column type metadata.
|
|
300
|
+
* @param {object} [columnMetadata] Optional column-specific metadata (e.g., custom schemas).
|
|
301
|
+
* @param {JSONOptions} [options] Optional configuration for JSON mode decoding.
|
|
302
|
+
* @returns {function} A high-performance decoding closure: `(value: Value) => Value`.
|
|
310
303
|
*/
|
|
311
|
-
declare function
|
|
304
|
+
export declare function getDecoder(type: spannerClient.spanner.v1.Type, columnMetadata?: object, options?: JSONOptions): (value: Value) => Value;
|
|
312
305
|
/**
|
|
313
306
|
* Re-decode after the generic gRPC decoding step.
|
|
314
307
|
*
|
|
@@ -440,6 +433,7 @@ export declare const codec: {
|
|
|
440
433
|
PGOid: typeof PGOid;
|
|
441
434
|
Interval: typeof Interval;
|
|
442
435
|
convertFieldsToJson: typeof convertFieldsToJson;
|
|
436
|
+
getDecoder: typeof getDecoder;
|
|
443
437
|
decode: typeof decode;
|
|
444
438
|
encode: typeof encode;
|
|
445
439
|
getType: typeof getType;
|