This repository was archived by the owner on May 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ import {
4343 writableVoid ,
4444} from '@naturalcycles/nodejs-lib'
4545import { DBLibError } from '../cnst'
46- import { DBModelType , DBPatch , DBTransaction , RunQueryResult } from '../db.model'
46+ import {
47+ CommonDBTransactionOptions ,
48+ DBModelType ,
49+ DBPatch ,
50+ DBTransaction ,
51+ RunQueryResult ,
52+ } from '../db.model'
4753import { DBQuery , RunnableDBQuery } from '../query/dbQuery'
4854import {
4955 CommonDaoCfg ,
@@ -1331,7 +1337,10 @@ export class CommonDao<
13311337 await this . cfg . db . ping ( )
13321338 }
13331339
1334- async runInTransaction ( fn : CommonDaoTransactionFn ) : Promise < void > {
1340+ async runInTransaction (
1341+ fn : CommonDaoTransactionFn ,
1342+ opt ?: CommonDBTransactionOptions ,
1343+ ) : Promise < void > {
13351344 await this . cfg . db . runInTransaction ( async tx => {
13361345 const daoTx = new CommonDaoTransaction ( tx , this . cfg . logger ! )
13371346
@@ -1341,7 +1350,7 @@ export class CommonDao<
13411350 await daoTx . rollback ( )
13421351 throw err
13431352 }
1344- } )
1353+ } , opt )
13451354 }
13461355
13471356 protected logResult ( started : number , op : string , res : any , table : string ) : void {
You can’t perform that action at this time.
0 commit comments