Usage of transaction
in Sails
#109
Closed
MaheshkumarSundaram
started this conversation in
General
Replies: 1 comment 2 replies
-
Because this is in a controller, instead of Past that I don't see anything. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @neonexus,
I have a scenario in which I am performing three or more DB update operations using Sails Models.
These operations have to be atomic. Either all or nothing at all. So, I found
.transaction()
.Sample Usage:
I have used the
.transaction()
in my above code and it works fine as I have testedBut I wasn't sure whether there are any caveats in my usage. If you are aware of any issue with the above usage, kindly point them out.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions