【发布时间】:2020-09-19 08:32:56
【问题描述】:
有没有更好的写法:
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>
...
)
我的数据集格式是:
[
{
item_id: "some_id",
map_id: "other_id"
}
...
]
用pg-promise 或什至只是简单的postgreSQL 写这个有什么好方法?
【问题讨论】:
标签: javascript sql postgresql sql-delete pg-promise