Skip to content

Conversation

risotto-master
Copy link

@risotto-master risotto-master commented Aug 20, 2025

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!

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant