Skip to content

Is it even possible to do server side paging towards the database if ordering can not be guaranteed? #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PerArneng opened this issue Dec 12, 2022 · 3 comments

Comments

@PerArneng
Copy link

The example paging provider in the source repository does an offset/limit query on each page. According to ex the PostgreSQL documentation it's not recommended to do that without an order by. https://www.postgresql.org/docs/current/queries-limit.html . Is it even possible to make reliable server-side paging when the order is not guaranteed?

@PerArneng
Copy link
Author

One solution that seems to work is to have database views that contain order by to ensure that there is an order

@wog48 wog48 added the bug label Dec 22, 2022
@wog48
Copy link
Contributor

wog48 commented Dec 22, 2022

Actually, also server driven paging shall by default create an ORDER BY primary key, as it is done for client driven paging with $top and $skip. This is a bug.

@wog48
Copy link
Contributor

wog48 commented Jan 6, 2023

I have created a correction. See PR #194.

Please try it out. In case you still face a problem, reopen the issue

@wog48 wog48 closed this as completed Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants