Open arielcarrera opened 4 years ago
/cc @geoand
Currently, when using a slice, we use the following constructor which require a page:
public SliceImpl(List<T> content, Pageable pageable, boolean hasNext) {
There is an other constructor of the Slice
which does not require a page. If we use this one, we could avoid the count query.
WDYT @geoand ?
I don't remember TBH. If you try it and it works, by all means open a PR :)
Last time I checked (which was months ago), I didn't implement it properly because we didn't have this kind of fuctionality in Panache, so a count query was the only way to go. But if you have a solution, then go for it :)
it looks like there is a range query now. I will give it a try and open a PR if this works :)
Cool!
Describe the bug When a method returns a Slice, it triggers a count query
Expected behavior When a method returns a Slice, must to avoid to trigger a count query
Actual behavior When a method returns a Slice, it triggers a count query
To Reproduce Steps to reproduce the behavior:
Configuration
Screenshots
Environment (please complete the following information):
Additional context