This commit is contained in:
2026-02-11 07:36:42 +01:00
parent 2741214db8
commit fd83f6ab1b
3 changed files with 7 additions and 7 deletions
@@ -29,7 +29,7 @@ export default function sqlInsertGenerator({
data.forEach((item) => {
queryBatches.push(
`(${insertKeys
.map((ky) => {
.map((ky, indx) => {
const value = item[ky];
const finalValue =
@@ -41,8 +41,8 @@ export default function sqlInsertGenerator({
: null;
if (!finalValue) {
queryValues.push("");
return "?";
insertKeys.splice(indx, 1);
return;
}
queryValues.push(finalValue);