insertMany to work with 0 records
Closed this issue · 1 comments
IlyaSemenov commented
Currently, insertMany([])
generates invalid SQL and crashes:
await db.user.insertMany([])
INSERT INTO "user"("user") VALUES
Error: syntax error at end of input
Can we perhaps instead return 0 immediately without actually running any SQL? Same goes for createMany
.
romeerez commented
Thanks for pointing, I published an update with this.