prisma-client-extensions
prisma-client-extensions copied to clipboard
Enable transactions with RLS
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!