Skip to content

Add transaction support for Supabase API #1190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CaLouro opened this issue Jun 10, 2025 · 0 comments
Open

Add transaction support for Supabase API #1190

CaLouro opened this issue Jun 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@CaLouro
Copy link

CaLouro commented Jun 10, 2025

Is your feature request related to a problem? Please describe.
I have the need for writing (inserting, updating, deleting) on more than one table in the database, but with the current package API I cannot do those actions inside a single atomic request.

Describe the solution you'd like
I'd love one of the two solutions that I think would benefit Supabase (or both, why not?):

  1. Create a Supabase Client method that allows me to bundle other method calls inside a single transaction that is guaranteed to run atomically and returns only a single error on failure;
  2. Create a Supabase Client method that allows sending a raw (or formatted) query to the database using the current logged in user's permissions (RLS, for example).

Describe alternatives you've considered
I've considered using Edge Functions or Stored Procedures for this but in my case:

  1. I'm not super versed in JS for the Edge Functions and I would have liked to keep this logic on device;
  2. Stored Procedures can be hard to write for methods with many parameters (objects along side lists in my case).

Additional context
I'd appreciate the consideration and help.

If there are any other methods for achieving the same result please let me know.

Thank you.

@CaLouro CaLouro added the enhancement New feature or request label Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant