Question: Is it possible to use pg.helpers.ColumnSet to skip updating value based on column's new value #882
rakeshriv
announced in
Announcements
Replies: 1 comment 1 reply
-
The above code should work, apart from the skip logic, which in case of a negative value becomes Note that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a requirement where I want to skip updating the column's value if after the update its value goes below 0. I tried looking up pg-promise's documentation but haven't found anything which serves my purpose. Basically I would want to do something like below (I know that the 'skip' part is incorrect but just posting here for clarifying my requirement).
Environment
Beta Was this translation helpful? Give feedback.
All reactions