We have an SQL statement which is executed by Jdbi (org.skife.jdbi.v2). For binding parameters we use Jdbi\'s bind method:
Handle h
The article you linked also descibes the @BindIn annotation. This provides a general purpose implementiation for lists.
@UseStringTemplate3StatementLocator
public class MyQuery {
@SqlQuery("select id from foo where name in ()")
List getIds(@BindIn("nameList") List nameList);
}
Please note that you'll have to escape all pointy brackets < like this \\<. There is a previous discusion on SO: How to do in-query in jDBI?