omar-dulaimi / prisma-zod-generator

Prisma 2+ generator to emit Zod schemas from your Prisma schema
MIT License
513 stars 45 forks source link

fix: add missing "skipDuplicates" option to createMany input args #74

Closed lottamus closed 1 year ago

lottamus commented 1 year ago

Description

Currently the zod output for CreateMany queries is only including the data property, but Prisma also allows skipDuplicates.

References

Prisma reference

https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany

Example output

Screenshot 2023-02-23 at 5 30 10 PM
omar-dulaimi commented 1 year ago

Is this option available on all database types?

omar-dulaimi commented 1 year ago

I just checked and found that these databases don't have that option:

mongodb
sqlserver

So we shouldn't generate it in these cases

omar-dulaimi commented 1 year ago

Released in https://github.com/omar-dulaimi/prisma-zod-generator/releases/tag/0.8.12

Thanks for the PR