Ivan Morgillo
Ivan Morgillo

Reputation: 3844

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

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?

Upvotes: 1

Views: 459

Answers (1)

Austin Crim
Austin Crim

Reputation: 1277

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

Upvotes: 1

Related Questions