Is there a better way to write the following:
DELETE FROM
table
WHERE
_id = $<id>
AND (
item_id = $<item_id>
AND map_id = $<map_id>
OR
item_id = $<another_id>
AND map_id = $<another_map_id>
...
)
The dataset format I have is:
[
{
item_id: "some_id",
map_id: "other_id"
}
...
]
What would be a good way to write this in pg-promise, or even just plain postgreSQL?