Re: Appropriate use of lazy fetching with fetchSize + fetchStream ?

2018-03-13 Thread Lukas Eder
Indeed, the JDK's Stream API doesn't offer any way to create chunks / substreams based on chunk sizes. Perhaps, you might find some appropriate abstraction in jOOλ https://github.com/jOOQ/jOOL But really, an imperative approach based on the org.jooq.Cursor type might be the easiest way forward.

Re: Appropriate use of lazy fetching with fetchSize + fetchStream ?

2018-03-13 Thread Lukas Eder
It's easy to explain. A "jOOQ Stream" is really just a wrapper around a "jOOQ Cursor" with some convenient API. A "jOOQ Cursor" is really just an Iterator wrapper around a JDBC ResultSet with some convenient API. Now, every time a "jOOQ Stream" or a "jOOQ Cursor" pulls another value from the

Re: Appropriate use of lazy fetching with fetchSize + fetchStream ?

2018-03-13 Thread LMey
Of course. Just one last question regarding Jooq if you don't mind. With a Cursor I can understand how it works... Like, it maintains an open ResultSet and you can fetch X records in a loop, do stuff with them and repeat. But how does Jooq handles that with a stream ? Is it abstracted ? You