Skip to content
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

Refactor raw paginator for affinity specifically #7851

Merged
merged 212 commits into from
Mar 25, 2025

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Mar 21, 2025

Refactor some of the "raw pagination" logic into RawPaginator, to help de-duplicate pagination
logic in cases that too complex (e.g., the result of JOINs, UNIONs) for the existing Diesel pagination
tools.

@@ -88,14 +88,14 @@ type BoxedQuery = diesel::query_builder::BoxedSqlQuery<
//
// But this relies on nightly features.
pub struct QueryBuilder {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was really difficult to write helper logic around this interface with a self-consuming API.

Changing the API to act on &mut self made this much more possible, but required minor refactors to existing users.

@smklein
Copy link
Collaborator Author

smklein commented Mar 21, 2025

I experimented with making this usable by many more pagination queries (see: #7717, #7763) but I'm keeping the scope limited for now to "affinity queries" for now.

Base automatically changed from affinity-expose-name to main March 24, 2025 23:14
@smklein smklein enabled auto-merge (squash) March 24, 2025 23:15
@smklein smklein merged commit d931394 into main Mar 25, 2025
16 checks passed
@smklein smklein deleted the affinity-pagination-cleanup branch March 25, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants