use of org.simpleflatmapper.beans.tables.records.TestSmallBenchmarkObjectRecord in project mapping-benchmark by arnaudroger.
the class JooqSfmRecordMapperBenchmark method main.
public static void main(String[] args) throws SQLException, NamingException {
ConnectionParam cp = new ConnectionParam();
cp.db = DbTarget.H2;
cp.init();
DSLContext dsl = DSL.using(new DefaultConfiguration().set(cp.dataSource).set(JooqMapperBenchmark.getSqlDialect(cp.db)).set(new SfmRecordMapperProvider()));
SelectOffsetStep<TestSmallBenchmarkObjectRecord> query = dsl.selectFrom(TestSmallBenchmarkObject.TEST_SMALL_BENCHMARK_OBJECT).limit(1);
for (MappedObject4 o : query.fetchInto(MappedObject4.class)) {
System.out.println("o = " + o);
}
for (MappedObject4 o : query.fetchInto(MappedObject4.class)) {
System.out.println("o = " + o);
}
}
Aggregations