SQL gen bugfix #4
This commit is contained in:
parent
ca99684183
commit
0309b0dc81
7
dist/utils/sql-generator-gen-search-str.js
vendored
7
dist/utils/sql-generator-gen-search-str.js
vendored
@ -81,9 +81,14 @@ export default function sqlGenGenSearchStr({ queryObj, join, field, table_name,
|
|||||||
str = operatorStrParam.str;
|
str = operatorStrParam.str;
|
||||||
sqlSearhValues.push(operatorStrParam.param);
|
sqlSearhValues.push(operatorStrParam.param);
|
||||||
}
|
}
|
||||||
else if (operatorStrParam.str) {
|
else if (operatorStrParam.str && !operatorStrParam.str.match(/\?/)) {
|
||||||
str = operatorStrParam.str;
|
str = operatorStrParam.str;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
sqlSearhValues.push(valueParsed || "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
console.log("str", str);
|
||||||
|
console.log("sqlSearhValues", sqlSearhValues);
|
||||||
return { str, values: sqlSearhValues };
|
return { str, values: sqlSearhValues };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/bun-sqlite",
|
"name": "@moduletrace/bun-sqlite",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"description": "SQLite manager for Bun",
|
"description": "SQLite manager for Bun",
|
||||||
"author": "Benjamin Toby",
|
"author": "Benjamin Toby",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@ -112,10 +112,15 @@ export default function sqlGenGenSearchStr({
|
|||||||
if (operatorStrParam.str && operatorStrParam.param) {
|
if (operatorStrParam.str && operatorStrParam.param) {
|
||||||
str = operatorStrParam.str;
|
str = operatorStrParam.str;
|
||||||
sqlSearhValues.push(operatorStrParam.param);
|
sqlSearhValues.push(operatorStrParam.param);
|
||||||
} else if (operatorStrParam.str) {
|
} else if (operatorStrParam.str && !operatorStrParam.str.match(/\?/)) {
|
||||||
str = operatorStrParam.str;
|
str = operatorStrParam.str;
|
||||||
|
} else {
|
||||||
|
sqlSearhValues.push(valueParsed || "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("str", str);
|
||||||
|
console.log("sqlSearhValues", sqlSearhValues);
|
||||||
|
|
||||||
return { str, values: sqlSearhValues };
|
return { str, values: sqlSearhValues };
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user