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) {
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)

View File

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