@@ -2217,9 +2217,6 @@ class Database extends common.GrpcServiceObject {
22172217 ? ( optionsOrCallback as GetTransactionOptions )
22182218 : { } ;
22192219
2220- // const defaultTransactionOptions =
2221- // this._getSpanner().defaultTransactionOptions;
2222-
22232220 return startTrace ( 'Database.getTransaction' , this . _traceConfig , span => {
22242221 this . pool_ . getSession ( ( err , session , transaction ) => {
22252222 if ( options . requestOptions ) {
@@ -2229,21 +2226,6 @@ class Database extends common.GrpcServiceObject {
22292226 ) ;
22302227 }
22312228 transaction ?. setTransactionOptions ( options ) ;
2232- // if (options.optimisticLock) {
2233- // transaction!.useOptimisticLock();
2234- // }
2235- // if (options.excludeTxnFromChangeStreams) {
2236- // transaction!.excludeTxnFromChangeStreams();
2237- // }
2238-
2239- // if (options.isolationLevel) {
2240- // transaction!.setIsolationLevel(options.isolationLevel);
2241- // }
2242- // else if (defaultTransactionOptions) {
2243- // transaction!.setIsolationLevel(
2244- // defaultTransactionOptions.isolationLevel
2245- // );
2246- // }
22472229
22482230 if ( ! err ) {
22492231 span . addEvent ( 'Using Session' , { 'session.id' : session ?. id } ) ;
@@ -3269,9 +3251,6 @@ class Database extends common.GrpcServiceObject {
32693251 ? ( optionsOrRunFn as RunTransactionOptions )
32703252 : { } ;
32713253
3272- // const defaultTransactionOptions =
3273- // this._getSpanner().defaultTransactionOptions;
3274-
32753254 startTrace ( 'Database.runTransaction' , this . _traceConfig , span => {
32763255 this . pool_ . getSession ( ( err , session ?, transaction ?) => {
32773256 if ( err ) {
@@ -3295,20 +3274,6 @@ class Database extends common.GrpcServiceObject {
32953274
32963275 transaction ! . _observabilityOptions = this . _observabilityOptions ;
32973276 transaction ! . setTransactionOptions ( options ) ;
3298- // if (options.optimisticLock) {
3299- // transaction!.useOptimisticLock();
3300- // }
3301- // if (options.excludeTxnFromChangeStreams) {
3302- // transaction!.excludeTxnFromChangeStreams();
3303- // }
3304- // if (options.isolationLevel) {
3305- // transaction!.setIsolationLevel(options.isolationLevel);
3306- // }
3307- // else if (defaultTransactionOptions) {
3308- // transaction!.setIsolationLevel(
3309- // defaultTransactionOptions.isolationLevel
3310- // );
3311- // }
33123277
33133278 const release = ( ) => {
33143279 this . pool_ . release ( session ! ) ;
@@ -3419,9 +3384,6 @@ class Database extends common.GrpcServiceObject {
34193384 ? ( optionsOrRunFn as RunTransactionOptions )
34203385 : { } ;
34213386
3422- // const defaultTransactionOptions =
3423- // this._getSpanner().defaultTransactionOptions;
3424-
34253387 let sessionId = '' ;
34263388 const getSession = this . pool_ . getSession . bind ( this . pool_ ) ;
34273389 return startTrace (
@@ -3439,20 +3401,6 @@ class Database extends common.GrpcServiceObject {
34393401 options . requestOptions
34403402 ) ;
34413403 transaction ! . setTransactionOptions ( options ) ;
3442- // if (options.optimisticLock) {
3443- // transaction.useOptimisticLock();
3444- // }
3445- // if (options.excludeTxnFromChangeStreams) {
3446- // transaction.excludeTxnFromChangeStreams();
3447- // }
3448- // if (options.isolationLevel) {
3449- // transaction!.setIsolationLevel(options.isolationLevel);
3450- // }
3451- // else if (defaultTransactionOptions) {
3452- // transaction!.setIsolationLevel(
3453- // defaultTransactionOptions.isolationLevel
3454- // );
3455- // }
34563404 sessionId = session ?. id ;
34573405 span . addEvent ( 'Using Session' , { 'session.id' : sessionId } ) ;
34583406 const runner = new AsyncTransactionRunner < T > (
@@ -3728,16 +3676,6 @@ class Database extends common.GrpcServiceObject {
37283676 this . _releaseOnEnd ( session ! , transaction ! , span ) ;
37293677 try {
37303678 transaction ! . setTransactionOptions ( options ) ;
3731- // if (options.defaultTransactionOptions) {
3732- // transaction!.setIsolationLevel(
3733- // options.defaultTransactionOptions.isolationLevel
3734- // );
3735- // }
3736- // else if (defaultIsolationLevelOptions) {
3737- // transaction!.setIsolationLevel(
3738- // defaultIsolationLevelOptions.isolationLevel
3739- // );
3740- // }
37413679 transaction ?. setQueuedMutations ( mutations . proto ( ) ) ;
37423680 return transaction ?. commit ( options , ( err , resp ) => {
37433681 if ( err ) {
0 commit comments