Announcement Announcement Module
Collapse
No announcement yet.
Query methods that return lazy List/Iterable? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query methods that return lazy List/Iterable?

    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:
    Code:
    Iterable<User> findAll();
    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:
    Code:
    void findAll(HandleSingleResult<User> handler);
Working...
X