Hi,

I'm not sure I'm using lazy fetching with streams correctly... I'm using 
Jooq 3.9.6 en Postgresql 9.5.

This is my (simplified) repo method :

public Stream<Example> findLazy() {
    return dslContext.select(...)
            .fetchSize(100)
            .fetchStream()
            .map(ExampleMapper::apply);
}


And my service method (running in a transaction) :

try (Stream<Example> stream = exampleRepository.findLazy()) {
    stream.forEach(magic::doStuff);
}


Will this chunk appropriately or load everything into memory ? How does 
this work exactly ? Sadly with postgresql I have not found any way of 
checking if this works.

Thanks

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to