romeerez/orchid-orm

insertMany to work with 0 records

Closed this issue · 1 comments

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.

Thanks for pointing, I published an update with this.