void executeInsert(Table table) { table.buildInsert(sqlBuilder); SqlStatement stmt = generatedList.isEmpty() ? trx.prepare(sqlBuilder) : trx.prepareAndGenerateKeys(sqlBuilder); for (Values values : valuesList) { ValuesBinder binder = stmt.valuesBinder(); values.bind(binder); stmt.addBatch(); } stmt.executeBatch(); if (!generatedList.isEmpty()) { Result generatedKeys = stmt.generatedKeys(); for (Generated lazy : generatedList) { if (generatedKeys.next()) { lazy.extract(generatedKeys); } } } }
@Override public Column read(Result rs, int index) { LocalDate value = rs.localDate(index); return withValue(value); }