We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Queries my dude:
Initial:
SELECT * FROM videos ORDER BY created_at DESC, id DESC -- latest on top LIMIT 50; -- 50 = pagesize
later: query with ?after_date=<latest_created_at>&after_id=<latest_id>
?after_date=<latest_created_at>&after_id=<latest_id>
SELECT * FROM videos WHERE (created_at, id) < (<latest_created_at>, <latest_id>) ORDER BY created_at DESC, id DESC LIMIT 50;
Disadvantages: cannot jump to specific page. Advantages: very fast and perfect for infinite scrolling
The text was updated successfully, but these errors were encountered:
standard pagination: https://github.com/diesel-rs/diesel/blob/v1.3.0/examples/postgres/advanced-blog-cli/src/pagination.rs
Sorry, something went wrong.
No branches or pull requests
Queries my dude:
Initial:
later: query with
?after_date=<latest_created_at>&after_id=<latest_id>
Disadvantages: cannot jump to specific page.
Advantages: very fast and perfect for infinite scrolling
The text was updated successfully, but these errors were encountered: