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