4 ms·
I assume they're on about an unbounded, pass array in situation (?) rather than having to dynamically build that part of the query (?,?,?...). Done both, manua
by tehbeard 5y ago
I assume they're on about an unbounded, pass array in situation (?) rather than having to dynamically build that part of the query (?,?,?...).
Done both, manually doing it looks messy, and higher chance of typos.
- chopin 5y agoI've done the latter, in JDBC and I built the (?,?,...) part programmatically. However you have to be aware how many ?s are elsewhere in the PreparedStatement such that filling the query with the array contents works correctly. It'd be a much better design decision if JDBC actually supported named parameters (as JPQL does).