Update Query algo

This commit is contained in:
Benjamin Toby
2024-11-06 10:30:00 +01:00
parent 6c78cae127
commit 54b7981be4
8 changed files with 43 additions and 14 deletions
+3 -7
View File
@@ -49,17 +49,13 @@ async function get({ key, db, query, queryValues, tableName }) {
*
* @description Look for local db settings in `.env` file and by pass the http request if available
*/
const {
DSQL_DB_HOST,
DSQL_DB_USERNAME,
DSQL_MARIADB_ROOT_PASSWORD,
DSQL_DB_NAME,
} = process.env;
const { DSQL_DB_HOST, DSQL_DB_USERNAME, DSQL_DB_PASSWORD, DSQL_DB_NAME } =
process.env;
if (
DSQL_DB_HOST?.match(/./) &&
DSQL_DB_USERNAME?.match(/./) &&
DSQL_MARIADB_ROOT_PASSWORD?.match(/./) &&
DSQL_DB_PASSWORD?.match(/./) &&
DSQL_DB_NAME?.match(/./)
) {
/** @type {import("../package-shared/types").DSQL_DatabaseSchemaType | undefined} */