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

Open
wants to merge 2 commits into
base: affinity-expose-name
Choose a base branch
from

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.

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.

1 participant