use of org.jdbi.v3.core.mapper.SomethingMapper in project jdbi by jdbi.
the class BindListNullTest method init.
@BeforeClass
public static void init() {
final Jdbi db = dbRule.getJdbi();
db.registerRowMapper(new SomethingMapper());
db.installPlugin(new SqlObjectPlugin());
handle = db.open();
handle.execute("insert into something(id, name) values(1, null)");
handle.execute("insert into something(id, name) values(2, null)");
handle.execute("insert into something(id, name) values(3, null)");
handle.execute("insert into something(id, name) values(4, null)");
handle.execute("insert into something(id, name) values(5, 'bla')");
handle.execute("insert into something(id, name) values(6, 'null')");
handle.execute("insert into something(id, name) values(7, '')");
}
use of org.jdbi.v3.core.mapper.SomethingMapper in project jdbi by jdbi.
the class BindListTest method init.
@BeforeClass
public static void init() {
final Jdbi db = dbRule.getJdbi();
db.installPlugin(new SqlObjectPlugin());
db.registerRowMapper(new SomethingMapper());
handle = db.open();
handle.execute("insert into something(id, name) values(1, '1')");
handle.execute("insert into something(id, name) values(2, '2')");
// "control group" element that should *not* be returned by the queries
handle.execute("insert into something(id, name) values(3, '3')");
expectedSomethings = Arrays.asList(new Something(1, "1"), new Something(2, "2"));
}
Aggregations