File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,6 @@ export interface GetIamPolicyOptions {
266266
267267/**
268268 * @typedef {object } GetTransactionOptions
269- * * @property {boolean } [readLockMode] The read lock mode a
270- * {@link Transaction} should use while running.
271269 */
272270export type GetTransactionOptions = Omit < RunTransactionOptions , 'timeout' > ;
273271
Original file line number Diff line number Diff line change @@ -1122,6 +1122,7 @@ class Table {
11221122 requestOptions : requestOptions ,
11231123 excludeTxnFromChangeStreams : excludeTxnFromChangeStreams ,
11241124 isolationLevel : isolationLevel ,
1125+ readLockMode : readLockMode ,
11251126 } ,
11261127 ( err , transaction ) => {
11271128 if ( err ) {
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import {google} from '../protos/protos';
4949import CreateDatabaseMetadata = google . spanner . admin . database . v1 . CreateDatabaseMetadata ;
5050import CreateBackupMetadata = google . spanner . admin . database . v1 . CreateBackupMetadata ;
5151import CreateInstanceConfigMetadata = google . spanner . admin . instance . v1 . CreateInstanceConfigMetadata ;
52+ import ReadLockMode = google . spanner . v1 . TransactionOptions . ReadWrite . ReadLockMode ;
5253const singer = require ( '../test/data/singer' ) ;
5354const music = singer . examples . spanner . music ;
5455import { util } from 'protobufjs' ;
@@ -9150,7 +9151,7 @@ describe('Spanner', () => {
91509151
91519152 it ( 'GOOGLE_STANDARD_SQL should use getTransaction for executing sql' , async ( ) => {
91529153 const transaction = (
9153- await DATABASE . getTransaction ( { optimisticLock : true } )
9154+ await DATABASE . getTransaction ( { readLockMode : ReadLockMode . OPTIMISTIC } )
91549155 ) [ 0 ] ;
91559156
91569157 try {
Original file line number Diff line number Diff line change @@ -3535,9 +3535,9 @@ describe('Database', () => {
35353535 readLockMode : ReadLockMode . PESSIMISTIC ,
35363536 } ;
35373537
3538- await database . runTransaction ( fakeOptions , assert . ifError ) ;
3538+ await database . runTransactionAsync ( fakeOptions , assert . ifError ) ;
35393539
3540- const options = fakeTransactionRunner . calledWith_ [ 3 ] ;
3540+ const options = fakeAsyncTransactionRunner . calledWith_ [ 3 ] ;
35413541 assert . strictEqual ( options , fakeOptions ) ;
35423542 } ) ;
35433543
You can’t perform that action at this time.
0 commit comments