-
Notifications
You must be signed in to change notification settings - Fork 51
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
Implement get_homogeneous_pages and select_homogeneous_pages #90
base: master
Are you sure you want to change the base?
Implement get_homogeneous_pages and select_homogeneous_pages #90
Conversation
Unit tests forthcoming once we're directionally aligned.
AFAIK using Full review coming soon when I have the time, thanks again :) |
Just wanted to follow up @acarapetis for a review when you have the chance! Thanks! |
@mattalbr Sorry for the delay on this, been a bit swamped. Hopefully will have time this weekend! |
Any updates to this? |
Hi Anthony, just wanted to ping here to see if you'll have time to review coming up! |
Hi @acarapetis, picking this back up, is there any way to get a review from you on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
?
@@ -152,6 +155,7 @@ def prepare_paging( | |||
backwards: bool, | |||
orm: Literal[True], | |||
dialect: Dialect, | |||
page_identifier: Optional[int] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.