prisma-client-extensions icon indicating copy to clipboard operation
prisma-client-extensions copied to clipboard

Enable transactions with RLS

Open risotto-master opened this issue 8 months ago • 0 comments

An attempt to have one Prisma client extension that does both RLS and supports transactions. Historically, this wasn't possible, because RLS was achieved by wrapping single model queries into transactions. This in turn causes transactions to nest, which isn't supported in most databases.

This looks like it works, but I'd like some confirmation from community / Prisma devs this makes sense. If not, would like to have a test case where it breaks and some explanation. Thanks!

risotto-master avatar Aug 20 '25 19:08 risotto-master