You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supabase does not provide an sql transaction mechanism, so i decided to use slonik as I don't want to deal with ORMs.
I do not want to write an RPC for everything that requires transactions so here I am.
I am not sure if I implemented the library correctly the code below shows my latest implementation.
Feel free to provide any constructive criticism.
I am mainly concerned about:
If the connection is stopped automatically?
Is there a better way to handle the transaction operations (unsafe)?
How should I properly initialise the pool createPool
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Supabase does not provide an sql transaction mechanism, so i decided to use
slonik
as I don't want to deal with ORMs.I do not want to write an RPC for everything that requires transactions so here I am.
I am not sure if I implemented the library correctly the code below shows my latest implementation.
Feel free to provide any constructive criticism.
I am mainly concerned about:
unsafe
)?createPool
functions used:
sql type aliases:
Beta Was this translation helpful? Give feedback.
All reactions