This commit is contained in:
Tben 2023-07-08 17:14:47 +01:00
parent e825506757
commit 7ff4ba1396
3 changed files with 12 additions and 2 deletions

View File

@ -62,6 +62,11 @@ async function query({ dbFullName, dbHost, dbPassword, dbUsername, query, values
* Clean up * Clean up
*/ */
await mysql.end(); await mysql.end();
/**
* Return error
*/
return error.message;
} }
//////////////////////////////////////// ////////////////////////////////////////

View File

@ -67,6 +67,11 @@ async function dsqlDbHandler({ queryString, queryValuesArray, database, tableSch
* Clean up * Clean up
*/ */
await mysql.end(); await mysql.end();
/**
* Return error
*/
return error.message;
} }
/** /**
@ -87,7 +92,7 @@ async function dsqlDbHandler({ queryString, queryValuesArray, database, tableSch
return JSON.parse(JSON.stringify(results)); return JSON.parse(JSON.stringify(results));
} else { } else {
console.log("\x1b[31mDSQL Database Handler No results returned\x1b[0m =>", results); console.log("\x1b[31mDSQL Database Handler No results returned\x1b[0m =>", results);
return null; return results;
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "datasquirel", "name": "datasquirel",
"version": "1.1.79", "version": "1.1.80",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {