So I have a query I need to run like UPDATE entity WHERE id IN (:ids)
. I know when doing a SELECT
I can do something like
val sql = "SELECT * FROM entity WHERE id IN (:ids)";
jdbcTemplate.queryForList(sql, Collections.singletonMap("ids", ids));
Is there any way to accomplish this for an `UPDATE` query where I don't have to just turn my list of ids into a comma seperated string and call it like
val params = ids.joinToString(",")
jdbcTemplate.update(sql, mapOf(Pair("ids", params)))
EDIT: Turns out the second way I listed doesn't even work because it is expecting a Double and gets a string