I want to delete rows which satisfy any of multiple conditions.
For example, I pass a list of IDs, and I want to delete all rows with these IDs
(IDs are uni
You could use id IN (1, 2, 3, 4, ...)
and directly print your array values inside the brackets:
database.delete("rows", String.format("id IN (%s)", StringUtils.join(ids, ",")));
As an alternative, I'd try to use some kind of flags
column for such things (if there's something like being able to flag single entries for deletion; I don't know how your ID list is "built").