Skip to content

[db-queries] allow paginated to work with joins - #10717

Merged
hawkw merged 3 commits into
mainfrom
eliza/paginated-joins
Jul 2, 2026
Merged

hawkw merged 3 commits into
mainfrom
eliza/paginated-joins

Conversation

@hawkw

@hawkw hawkw commented Jul 1, 2026

Copy link
Copy Markdown
Member

Many moons ago, I merged PR #6530, which allowed the paginated_multicolumn wrapper to work with a query expression which could be a table, or a join of two or more tables, rather than just a single table. This involved some extremely complex and unpleasant Diesel magic that, in hindsight, I have no no idea how I figured out, but it did work. However, the same change was never applied to the paginated function, just paginated_multicolumn. I guess that in the intervening two years, we have never needed to paginate a join on one column rather than two.

Well, now I need to do this. So this branch makes a similar change to paginated. This is basically copied from what I did to paginated_multicolumn in #6530, but slightly simpler because there are fewer columns which must be ordered. Hooray!

@hawkw hawkw self-assigned this Jul 1, 2026
@hawkw hawkw added the database Related to database access label Jul 1, 2026
@hawkw

hawkw commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@david-crespo

david-crespo commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Not the first time I've seen CI run using config from a different commit than the one on the PR. If you rebase on main it'll work. But wow. I think the error is because the default license scanner config it falls back to doesn't have the file patterns to exclude a symlink that points to a directory and it doesn't know what the hell to do with that.

Many moons ago, I merged PR #6530, which allowed the
`paginated_multicolumn` wrapper to work with a `query` expression which
could be a table, *or* a join of two or more tables, rather than just a
single table. This involved some extremely complex and unpleasant Diesel
magic that, in hindsight, I have no no idea  how I figured out, but it
did work. However, the same change was never applied to the `paginated`
function, just `paginated_multicolumn`. I guess that in the intervening
year and change, we have never needed to paginate a join on one column.

Well, now I need to do this. So this branch makes a similar change to
`paginated`. This is basically copied from what I did to
`paginated_multicolumn` in #6530, but slightly simpler because there are
fewer columns which must be ordered. Hooray!
@hawkw
hawkw force-pushed the eliza/paginated-joins branch from a5fce95 to bf0329c Compare July 1, 2026 21:30
@hawkw

hawkw commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Not the first time I've seen CI run using config from a different commit than the one on the PR. If you rebase on main it'll work. But wow. I think the error is because the default license scanner config it falls back to doesn't have the file patterns to exclude a symlink that points to a directory and it doesn't know what the hell to do with that.

yup, done. thanks!

@hawkw
hawkw enabled auto-merge (squash) July 1, 2026 21:33
@hawkw
hawkw merged commit b40ad56 into main Jul 2, 2026
19 checks passed
@hawkw
hawkw deleted the eliza/paginated-joins branch July 2, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database Related to database access

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants