-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db-queries] Allow join expressions in
paginated-multicolumn
(#6530)
Currently, the `paginated_multicolumn` utility in `nexus_db_queries::pagination` only works when the select expression to paginate is a table, and both columns to order by come from that table. This means that it cannot easily be used to fix the bug in `instance_and_vmm_list_by_sled_agent` that @davepacheco describes in [this comment][1], which would require using `paginated_multicolumn` to paginate on two columns in an inner join expression. This commit changes the giant wad of Diesel type ceremony on `paginated_multicolumn` in order to ~~make it even worse~~ allow expressions which are not tables to be paginated. I've added a test demonstrating that this does, in fact, work. Figuring out how to do this was...certainly an experience which I have had. I think I need to lie down now. [1]: #6519 (review)
- Loading branch information
Showing
1 changed file
with
228 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters