KrJooqWrapper wrapper = new KrJooqWrapper(1) BatchBindStep x = wrapper.getCreate() .batch(wrapper.getCreate() .insertInto(TABLE, TABLE.COL_A, TABLE.COL_B) .values((Integer)null, (String)null)); x.bind(0, "blah");x.execute();
@Overridepublic void executeEnd(ExecuteContext ctx) { if (isLogQuery) { // Formatter for printing DSLContext formatter = DSL.using(ctx.dialect(), new Settings() .withRenderFormatted(true) .withRenderKeywordStyle(RenderKeywordStyle.UPPER) .withRenderNameStyle(RenderNameStyle.AS_IS));
// For every query in batch mode (or 1 in non-match mode) StringBuilder sb = new StringBuilder(); sb.append("The query(s) was: \n"); for (Query query : ctx.batchQueries()) { sb.append(formatter.renderInlined(query) + "\n"); }
Logging.logInfo(sb.toString()); }}
The query(s) was:
INSERT INTO db.a_table ( col_a, col_b)VALUES ( NULL, NULL)
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.