diff --git a/.gitignore b/.gitignore index 5db3371..ea93cec 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ coverage lib .eslintcache package-lock.json +.idea diff --git a/src/client.ts b/src/client.ts index a3e9358..a57c1c7 100644 --- a/src/client.ts +++ b/src/client.ts @@ -93,7 +93,7 @@ export class RDSClient extends Operator { if (options?.conn) { conn = options.conn; } else { - let ctx = this.#connectionStorage.getStore(); + const ctx = this.#connectionStorage.getStore(); const ctxConn = ctx?.[this.#connectionStorageKey]; if (ctxConn) { conn = ctxConn; diff --git a/test/client.test.ts b/test/client.test.ts index 22022c7..bf9a660 100644 --- a/test/client.test.ts +++ b/test/client.test.ts @@ -656,7 +656,7 @@ describe('test/client.test.ts', () => { await db.beginTransactionScope(async () => { await db.query(`insert into ??(name, email, gmt_create, gmt_modified) values(?, ?, now(), now())`, - [ table, prefix + 'multiple-instance1', prefix + 'm@multiple-instance.com' ]); + [ table, prefix + 'multiple-instance1', prefix + 'm@multiple-instance.com' ]); return db; }); assert(querySql); @@ -675,9 +675,9 @@ describe('test/client.test.ts', () => { await db.beginTransactionScope(async () => { await db.query(`insert into ??(name, email, gmt_create, gmt_modified) values(?, ?, now(), now())`, - [ table, prefix + 'multiple-instance1', prefix + 'm@multiple-instance.com' ], { - conn - }); + [ table, prefix + 'multiple-instance1', prefix + 'm@multiple-instance.com' ], { + conn, + }); return db; }); assert(connQuerySql);