How can I do INSERT with SQLITE with ON CONFLICT REPLACE strategy?

Viewed 55

I'm experimenting with Prisma, and I'm liking it so far. The only thing I can't figure out is how to specify a on conflict strategy.

I'm using Sqlite, but I can't find any documentation for Prisma to allow me to insert data with a more resilient strategy against duplicates.

How can apply IGNORE/REPLACE/etc. from the ON CONFLICT DOC?

1 Answers

Prisma doesn't have built-in support for ON CONFLICT. The upsert method might help here, otherwise, you can use $queryRaw.

Related