Repository navigation
null value support for keyset pagination
#923
Unanswered
OuttaSpaceTime
asked this question in
Q&A
Replies: 2 comments 5 replies
Currently yes. How would you like to order the records with columns that have null values? How could you make it generic (DB agnostic)? Couldn't you just skip the nullable columns from your keyset? Why it is required? It didn't seem to be an important feature compared to the planning and work required at the time of the implementation, so it's not supported ATM, however we are open to consider it. |
4 replies
|
For my use case I would have chosen nulls first befor descending dates and vice versa. Optimally it should be configurable globally and once per pagy call to overwrite the global setting. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I've noticed, that keyset pagination with null values does not seem to be supported in pagy. Is this the case? I am wondering why. It blocks us from migrating to pagy for a few endpoints.
The following fails for me:
And fails with just skipping those rows:
I've only found a sentence about it for the
tuple_comparisonoption:For example Rails supports
nulls_firstandnulls_lastand I think that it migh be quite a reasonable option here as well. I've seen that there are several ways how it could be done from an SQL perspectie. I think degrading the general performance is the only risk and would need careful investigation and potentially an explicit option.In our case the query resulted in a direct
> NULLcomparision. That loded only the pages withnilvalues and refused to paginte further as it's not supported in postgres.If it's not on the roadmap at all, it would be very good to find it out more easily.
Thanks!
Felix
All reactions