This commit is contained in:
rizrmd 2024-06-04 13:16:16 +07:00
parent 594b37371b
commit 165c8d10aa
1 changed files with 7 additions and 6 deletions

View File

@ -96,12 +96,13 @@ export const execQuery = async (args: DBArg, prisma: any) => {
} }
if (inserts.length > 0) { if (inserts.length > 0) {
transactions.push( for (const row of inserts) {
prisma[table].createMany({ transactions.push(
data: inserts, prisma[table].create({
skipDuplicates: true, data: row,
}) })
); );
}
} }
if (updates.length > 0) { if (updates.length > 0) {