update incrementing value (postgres)
So, i have a table:
at the time i want to do the update, i know the required rows are there, initialized at
0
and i'll do batch updates with objects that look like:
where "8" is experimentId, "25" is variantId and i want to update the relevant line, adding 4
to the existing value that was there before...
Is there a good way to do this?1 Reply
This is a javascript question, you just need to do transformations to your data before sending to drizzle
Along the lines of
Object.entries(theObjectToTransform).map(...)