I may be missing something, but it seems that Spring Data is conspicuously missing the ability to perform a query that returns an arbitrarily large result set and load/process the rows on demand rather than loading the whole thing into memory at once. Is this available somewhere? Planned for a future release?
E.g. I'd expect to be able to write a query method such as:
And then be able to iterate over all Users in that collection without necessarily loading the whole collection into memory at once. Alternately, it might be done with a callback mechanism, similar to how JdbcTemplate.query() works, such as:
E.g. I'd expect to be able to write a query method such as:
Code:
Iterable<User> findAll();
Code:
void findAll(HandleSingleResult<User> handler);