This commit is contained in:
Benjamin Toby
2024-11-12 06:47:31 +01:00
parent 7dd8111b5b
commit c6964df00b
2 changed files with 21 additions and 9 deletions
+16 -7
View File
@@ -69,13 +69,22 @@ function sqlGenerator({ tableName, genObject }) {
typeof mtch.source == "object" ? mtch.source.tableName : tableName
}.${
typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source
}=${
typeof mtch.target == "object"
? mtch.target.tableName
: join.tableName
}.${
typeof mtch.target == "object" ? mtch.target.fieldName : mtch.target
}`;
}=${(() => {
if (mtch.targetLiteral) {
sqlSearhValues.push(mtch.targetLiteral);
return "?";
}
return `${
typeof mtch.target == "object"
? mtch.target.tableName
: join.tableName
}.${
typeof mtch.target == "object"
? mtch.target.fieldName
: mtch.target
}`;
})()}`;
}
let queryString = (() => {