This commit is contained in:
Benjamin Toby
2025-02-05 19:34:03 +01:00
parent 1acdad97a2
commit 06de31dcb2
10 changed files with 23 additions and 15 deletions
+2 -5
View File
@@ -41,7 +41,6 @@ function sqlGenerator({ tableName, genObject, dbFullName }) {
}
}
else if (Array.isArray(queryObj.value)) {
/** @type {string[]} */
const strArray = [];
queryObj.value.forEach((val) => {
const valueParsed = val;
@@ -62,13 +61,11 @@ function sqlGenerator({ tableName, genObject, dbFullName }) {
return str;
}
const sqlSearhString = queryKeys === null || queryKeys === void 0 ? void 0 : queryKeys.map((field) => {
const queryObj =
/** @type {import("../../../types").ServerQueryQueryObject} */ finalQuery === null || finalQuery === void 0 ? void 0 : finalQuery[field];
const queryObj = finalQuery === null || finalQuery === void 0 ? void 0 : finalQuery[field];
if (!queryObj)
return;
if (queryObj.__query) {
const subQueryGroup =
/** @type {import("../../../types").ServerQueryQueryObject}} */ queryObj.__query;
const subQueryGroup = queryObj.__query;
const subSearchKeys = Object.keys(subQueryGroup);
const subSearchString = subSearchKeys.map((_field) => {
const newSubQueryObj = subQueryGroup === null || subQueryGroup === void 0 ? void 0 : subQueryGroup[_field];