SQL Query Generator Bugfix
This commit is contained in:
parent
b337e5748f
commit
9142f3b3e0
@ -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)
|
||||||
|
@ -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": {
|
||||||
|
Loading…
Reference in New Issue
Block a user