Implement get_homogeneous_pages and select_homogeneous_pages - #90
Implement get_homogeneous_pages and select_homogeneous_pages#90mattalbr wants to merge 159 commits into
Conversation
Unit tests forthcoming once we're directionally aligned.
acarapetis
commented
Jul 20, 2023
AFAIK using Full review coming soon when I have the time, thanks again :) |
mattalbr
commented
Aug 7, 2023
Just wanted to follow up @acarapetis for a review when you have the chance! Thanks! |
acarapetis
commented
Aug 24, 2023
@mattalbr Sorry for the delay on this, been a bit swamped. Hopefully will have time this weekend! |
ddorian
commented
Sep 12, 2023
Any updates to this? |
mattalbr
commented
Sep 27, 2023
Hi Anthony, just wanted to ping here to see if you'll have time to review coming up! |
mattalbr
commented
Apr 16, 2024
Hi @acarapetis, picking this back up, is there any way to get a review from you on this PR? |
acarapetis
left a comment
There was a problem hiding this comment.
Took me a long while to get to this - hopefully it's still useful to you to get this merged.
Looks good overall - I've left a couple of minor comments.
| unpaged: list | ||
| gathered: deque | ||
| backwards: bool | ||
| page: Tuple[Union[MarkerLike, str], bool] |
There was a problem hiding this comment.
This type is confusing me and making pyright raise a bunch of errors in check_multiple_paging_*. I think it should just be page: MarkerLike?
| backwards: bool, | ||
| orm: Literal[True], | ||
| dialect: Dialect, | ||
| page_identifier: Optional[int] = None, |
There was a problem hiding this comment.
There are page_identifier: Optional[int] parameters on a few functions in this module, but none of them seem to be used. Am I missing something, or they can be removed?
The select version was super challenging to write, but we made it. Lots of type wrangling to get the query to work with orm entities. Doesn't work in 1.3, but neither does select(Book, Book.id) with a normal page. Figure it's probably pretty rare to be using select() and 1.3 anyway.