Pageable/start from 1#1566
Conversation
|
Looks fine to me, you might want to throw an exception if somebody sends 0 as the page number. |
|
I'm not sure this change is enough. The return value of would also need to be shifted whenever an instance ofPage is returned would it not?
|
|
It's only problematic if you use |
|
Bumping, any updates on this? would be super cool to have this as a configurable |
|
@BrianEstrada I haven't done anything as of recently but I was researching a way to do this without shifting the page number down 1. I remember there might be a way to change what is returned via offsets in the pageable interface but Its been a while. |
|
|
What this does
Why is this needed
oneIndexedParametersproperty.This makes sense, since by default, all paginated queries start at page 1.- https://docs.github.com/en/rest/guides/traversing-with-paginationI am sure there are better ways to implement this, but this is similar to how spring has it implemented.
Also I noticed the docs for configuration properties are here: https://micronaut-projects.github.io/micronaut-data/latest/guide/configurationreference.html#io.micronaut.data.r2dbc.config.DataR2dbcConfiguration which doesn't seem to be linked to micronaut-data. Let me know if you would like me to update these docs if this does move forward.