Suppose I have a table Car. This table has the following columns: id(uuid), status(text), color(text).
I have pushed all the Car ids that have a specific color into an array:
Suppose I have an array of the Car ids (the size of the array can change):
let car_ids_arr = ['id1', 'id2', ...'idn']
Now I need to update all rows (for example, set status to false) in Car where the id matches the ids in arr. I don't want to do this in a for loop and make several calls to the database, I rather do it all in one call.
The size of my array of ids can change , so I am not sure how to approach this... any pointers?