How can I execute somethings like this in jDBI ?
@SqlQuery(\"select id from foo where name in \")
List getIds(@Bind(
Use @Define annotation to build dynamic queries in jDBI. Example:
@SqlUpdate("insert into (id, name) values (:id, :name)")
public void insert(@Define("table") String table, @BindBean Something s);
@SqlQuery("select id, name from where id = :id")
public Something findById(@Define("table") String table, @Bind("id") Long id);
- 热议问题