Compare commits

..

3 Commits

Author SHA1 Message Date
3d877bc1c9
v1.5.12 2023-08-15 22:32:00 +03:00
5a882304a5
Small fixes 2023-08-15 22:31:41 +03:00
3b50f2dad5
v1.5.11 2023-08-12 23:05:11 +03:00
3 changed files with 6 additions and 2 deletions

View File

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

View File

@ -416,6 +416,8 @@ class MariaDB
if (!this.ready)
return Promise.reject(new Error('MariaDB not ready'));
query = query.trim();
let batch = false;
if (values && typeof values.some === 'function')
batch = values.some(val => val instanceof Array);

View File

@ -50,6 +50,7 @@ class MongoDB
#config: MongoOptions;
#logger: ILogger;
#URI: string;
#load: boolean;
#db: Db | null;
#_client: MongoClient;
@ -69,6 +70,7 @@ class MongoDB
this.#config = config;
this.#db = null; // DB connection
this.#_database = database; // Which database to connect to
this.#load = config.load ?? true;
this.#logger = server.createLogger(this, config.loggerOptions);
@ -121,7 +123,7 @@ class MongoDB
async init ()
{
if (!this.#config.load)
if (!this.#load)
return this.#logger.info('Not loading MongoDB');
if (this.#db)