Is there a way to update rows based on current val...
# help
m
Is there a way to update rows based on current value. So instead of querying current value, you can say quantity + 10 for an update? I know Postgres supports it natively, does the API have a way of doing it?
m
yes I think something like this should work:
Copy code
sql
UPDATE yourtable SET yourvalue = CASE
   WHEN yourvalue = 5 THEN yourvalue + 5
   WHEN yourvalue = 10 THEN yourvalue + 10
END
n
yes, on the sql side there's no issue
the question was specifically for the client APIs