Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars-Erik Roald committed Jul 4, 2024
1 parent 1eaf4d6 commit b77620a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/mssql/newTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/mySql/newDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions src/oracle/newTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function newResolveTransaction(domain, pool, { readonly } = {}) {
};
rdb.aggregateCount = 0;
rdb.quote = (name) => `"${name}"`;

if (readonly) {
rdb.dbClient = {
executeQuery: function(query, callback) {
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/sap/newTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b77620a

Please sign in to comment.