Hi this is raja ,
I want to update the multiple key values on collection on single query. i tried following
UPDATE storage SET
value = jsonb_set(value, ‘{level}’::VARCHAR, (COALESCE(value->>‘level’,‘0’)::INT + 1)::VARCHAR::JSONB, true)
WHERE id = $1 AND collection = ‘heroes’ AND key = ‘hero1’;
its working fine for single key
I want to increment values for multiple keys in single query , Like
power, health,speed (these are for example in my game i have another fields)
i want to update all of them in single query ( my game needs this)
all if them are increment values only
how to do that?
Thank you