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", "name": "@navy.gif/wrappers",
"version": "1.6.6", "version": "1.6.4",
"description": "Various wrapper classes I use in my projects", "description": "Various wrapper classes I use in my projects",
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git", "repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
"author": "Navy.gif", "author": "Navy.gif",

View File

@ -337,9 +337,6 @@ class MariaDB
const pool = this.#pool; const pool = this.#pool;
if (nodeName) 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); const node = this.#nodes.find(n => n.name === nodeName);
if (!node) if (!node)
{ {
@ -394,7 +391,7 @@ class MariaDB
resolve(fields); resolve(fields);
connection.release(); connection.release();
}); });
this.#logger.debug(`Constructed query: ${q.sql.substring(0, 1024)}`); this.#logger.debug(`Constructed query: ${q.sql}`);
}); });
return Promise.resolve(result || []); return Promise.resolve(result || []);
} }
@ -424,7 +421,7 @@ class MariaDB
let batch = false; let batch = false;
if (values && typeof values.some === 'function') if (values && typeof values.some === 'function')
batch = values.some(val => val instanceof Array); 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); return this.#_query<T>(query, values ?? [], opts);