Hi Venkat, Yes you can. This is not documented prominently, but it is mentioned here: - http://www.jooq.org/doc/3.2/manual/sql-execution/fetching - http://www.jooq.org/javadoc/latest/org/jooq/ResultQuery.html#fetchLazy(int)
// Create a "lazy" Cursor, that keeps an open underlying JDBC ResultSetCursor<R> fetchLazy();Cursor<R> fetchLazy(int fetchSize); Interestingly, though, this had been implemented only for lazy fetching, at the time. I think it should be supported for all sorts of ResultQuery. I will fix this in jOOQ 3.3: https://github.com/jOOQ/jOOQ/issues/2806 If you need more control over the JDBC fetch size flag, you can implement an ExecuteListener: public class FetchSizeListener extends DefaultExecuteListener { @Override public void prepareEnd(ExecuteContext ctx) { try { ctx.statement().setFetchSize(myFetchSize); } catch (SQLException e) { throw new DataAccessException("Exception while setting fetch size", e); } } } Hope this helps Lukas 2013/10/28 Venkat Sadasivam <[email protected]> > Lukas: > > Are there any way to set fetch size in jOOQ API? > > http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#setFetchSize(int) > > Thanks, > Venkat > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
