Compare commits

..

No commits in common. "1a45c35090b7fa4f669ec7bd983a0c8bb2e94aa0" and "4240e978cf4bd6002a5c2b62841ed303f543f319" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@navy.gif/wrappers",
"version": "1.6.6",
"version": "1.6.4",
"description": "Various wrapper classes I use in my projects",
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
"author": "Navy.gif",

View File

@ -337,9 +337,6 @@ class MariaDB
const pool = this.#pool;
if (nodeName)
{
const available = this.#nodes.filter(n => n.status === 'synced');
if (!available.length)
throw new Error('No nodes available for query');
const node = this.#nodes.find(n => n.name === nodeName);
if (!node)
{
@ -361,7 +358,7 @@ class MariaDB
this.#logger.debug(`Selected node ${nodeName} for query`);
return pool.of(nodeName ?? '*').getConnection((err, conn) =>
{
if (err)
if (err)
return reject(err);
return resolve(conn);
});
@ -394,7 +391,7 @@ class MariaDB
resolve(fields);
connection.release();
});
this.#logger.debug(`Constructed query: ${q.sql.substring(0, 1024)}`);
this.#logger.debug(`Constructed query: ${q.sql}`);
});
return Promise.resolve(result || []);
}
@ -424,7 +421,7 @@ class MariaDB
let batch = false;
if (values && typeof values.some === 'function')
batch = values.some(val => val instanceof Array);
this.#logger.debug(`Incoming query (batch: ${batch})\n${query}\n${inspect(values).substring(0, 1024)}`);
this.#logger.debug(`Incoming query (batch: ${batch})\n${query}\n${inspect(values)}`);
return this.#_query<T>(query, values ?? [], opts);