spring-data-commons icon indicating copy to clipboard operation
spring-data-commons copied to clipboard

Add support for find using predicate/pageable that returns a `Slice` [DATACMNS-541]

Open spring-projects-issues opened this issue 10 years ago • 4 comments

Seshu Pasam opened DATACMNS-541 and commented

Am using QueryDslPredicateExecutor. What I really need is following method:

Slice<T> findAll(Predicate predicate, Pageable pageable);

The reason I don't want to use findAll that returns Page<T> is because it has twice the overhead (for performing the count operation). I am using spring-data mongodb 1.5.1


Affects: 1.8 GA (Dijkstra)

Issue Links:

  • DATAJPA-289 Add findAll(Predicate, Pageable) method to QueryDslPredicateExecutor that returns only List/Iterable

  • DATACMNS-548 Add documentation of Slice for repository query methods

7 votes, 5 watchers

spring-projects-issues avatar Jul 16 '14 19:07 spring-projects-issues

With #2228 we introduced a fluent API for Querydsl and Query by Example and it would be neat to have a Slice<T> slice(Pageable) method in addition to Page<T> page(Pageable).

mp911de avatar Nov 09 '21 10:11 mp911de

Still no work on this? It is critical for large datasets, as the count query then makes a traditional Page approach unusable!

membersound avatar Jul 26 '22 15:07 membersound

Will this be implemented eventually?

simasch avatar Jan 03 '23 15:01 simasch

Also need this feature. Will it be implemented?

reactivestudio avatar Feb 21 '24 22:02 reactivestudio