SQL Query Generator Bugfix

This commit is contained in:
Benjamin Toby 2024-11-08 20:53:56 +01:00
parent b337e5748f
commit 9142f3b3e0
2 changed files with 7 additions and 2 deletions

View File

@ -148,7 +148,12 @@ function sqlGenerator({ tableName, genObject }) {
if (sqlSearhString) { if (sqlSearhString) {
const stringOperator = genObject?.searchOperator || "AND"; const stringOperator = genObject?.searchOperator || "AND";
queryString += ` WHERE ${sqlSearhString.join(` ${stringOperator} `)} `; queryString += ` WHERE ${sqlSearhString
.map((str) => {
if (genObject.join) return `${tableName}.${str}`;
return str;
})
.join(` ${stringOperator} `)} `;
} }
if (genObject.order) if (genObject.order)

View File

@ -1,6 +1,6 @@
{ {
"name": "datasquirel", "name": "datasquirel",
"version": "2.5.1", "version": "2.5.2",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"bin": { "bin": {