This commit is contained in:
2026-02-21 22:18:18 +01:00
parent a68e42beab
commit 0e44676226
5 changed files with 41 additions and 3 deletions
+13
View File
@@ -101,6 +101,19 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
return str;
}
function generateJoinStr(mtch, join) {
if (mtch.__batch) {
let btch_mtch = ``;
btch_mtch += `(`;
for (let i = 0; i < mtch.__batch.matches.length; i++) {
const __mtch = mtch.__batch.matches[i];
btch_mtch += `${generateJoinStr(__mtch, join)}`;
if (i < mtch.__batch.matches.length - 1) {
btch_mtch += ` ${mtch.__batch.operator || "OR"} `;
}
}
btch_mtch += `)`;
return btch_mtch;
}
return `${finalDbName}${typeof mtch.source == "object" ? mtch.source.tableName : tableName}.${typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source}=${(() => {
if (mtch.targetLiteral) {
return `'${mtch.targetLiteral}'`;