From b77620aaf2eb4852b9abd63c47bbbb6978c0bc47 Mon Sep 17 00:00:00 2001 From: Lars-Erik Roald Date: Thu, 4 Jul 2024 16:09:33 +0200 Subject: [PATCH] lint --- src/mssql/newTransaction.js | 3 ++- src/mySql/newDatabase.js | 2 +- src/oracle/newTransaction.js | 4 ++-- src/sap/newTransaction.js | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mssql/newTransaction.js b/src/mssql/newTransaction.js index 4a158953..ef4bd419 100644 --- a/src/mssql/newTransaction.js +++ b/src/mssql/newTransaction.js @@ -14,7 +14,6 @@ function newResolveTransaction(domain, pool, { readonly } = {}) { pool = pool(); rdb.pool = pool; } - client.setUseUTC(false); rdb.engine = 'mssqlNative'; rdb.encodeBoolean = encodeBoolean; rdb.decodeJSON = decodeJSON; @@ -51,6 +50,7 @@ function newResolveTransaction(domain, pool, { readonly } = {}) { return callback(err); } try { + client.setUseUTC(false); client.executeQuery = wrapQuery(client); rdb.dbClient = client; wrapQuery(client)(query, (err, res) => { @@ -79,6 +79,7 @@ function newResolveTransaction(domain, pool, { readonly } = {}) { onError(err); return; } + client.setUseUTC(false); client.executeQuery = wrapQuery(client); rdb.dbClient = client; rdb.dbClientDone = done; diff --git a/src/mySql/newDatabase.js b/src/mySql/newDatabase.js index 5953ba2f..417a0738 100644 --- a/src/mySql/newDatabase.js +++ b/src/mySql/newDatabase.js @@ -72,7 +72,7 @@ function newDatabase(connectionString, poolOptions) { c.createTransaction = function() { let domain = createDomain(); let transaction = newTransaction(domain, pool); - let p = domain.run(() => new Promise(transaction).then(_begin)); + let p = domain.run(() => new Promise(transaction).then(_begin)); function run(fn) { return p.then(domain.run.bind(domain, fn)); diff --git a/src/oracle/newTransaction.js b/src/oracle/newTransaction.js index 44c7eefb..df1fe583 100644 --- a/src/oracle/newTransaction.js +++ b/src/oracle/newTransaction.js @@ -36,7 +36,7 @@ function newResolveTransaction(domain, pool, { readonly } = {}) { }; rdb.aggregateCount = 0; rdb.quote = (name) => `"${name}"`; - + if (readonly) { rdb.dbClient = { executeQuery: function(query, callback) { @@ -76,7 +76,7 @@ function newResolveTransaction(domain, pool, { readonly } = {}) { } client.executeQuery = wrapQuery(client); rdb.dbClient = client; - rdb.dbClientDone = done; + rdb.dbClientDone = done; domain.rdb = rdb; onSuccess(); diff --git a/src/sap/newTransaction.js b/src/sap/newTransaction.js index d95b9633..e1ebe25d 100644 --- a/src/sap/newTransaction.js +++ b/src/sap/newTransaction.js @@ -82,7 +82,7 @@ function newResolveTransaction(domain, pool, { readonly } = {}) { client.executeQuery = wrapQuery(client); rdb.dbClient = client; rdb.dbClientDone = done; - domain.rdb = rdb; + domain.rdb = rdb; onSuccess(); } catch (e) { onError(e);