Updates
This commit is contained in:
@@ -29,7 +29,7 @@ export default function sqlInsertGenerator({
|
||||
data.forEach((item) => {
|
||||
queryBatches.push(
|
||||
`(${insertKeys
|
||||
.map((ky, indx) => {
|
||||
.map((ky) => {
|
||||
const value = item[ky];
|
||||
|
||||
const finalValue =
|
||||
@@ -41,8 +41,8 @@ export default function sqlInsertGenerator({
|
||||
: null;
|
||||
|
||||
if (!finalValue) {
|
||||
insertKeys.splice(indx, 1);
|
||||
return;
|
||||
queryValues.push("");
|
||||
return "?";
|
||||
}
|
||||
|
||||
queryValues.push(finalValue);
|
||||
|
||||
Reference in New Issue
Block a user