use of org.jdbi.v3.core.statement.DefaultStatementBuilder in project jdbi by jdbi.
the class TestTooManyCursors method testFoo.
@Test
public void testFoo() throws Exception {
ConnectionFactory cf = dbRule.getConnectionFactory();
ConnectionFactory errorCf = new ErrorProducingConnectionFactory(cf, 99);
Jdbi db = Jdbi.create(errorCf);
db.useHandle(handle -> {
handle.setStatementBuilder(new DefaultStatementBuilder());
for (int idx = 0; idx < 100; idx++) {
handle.createQuery("SELECT " + idx + " FROM something").mapTo(int.class).findFirst();
}
});
}
Aggregations