-
Notifications
You must be signed in to change notification settings - Fork 200
Make it easier to set a container size using search #466
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
Conversation
use totalSize so we dont do any more http requests then needed.
fix comment.
|
@Montellese Does solve your issue with search? |
Montellese
left a comment
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.
The feature set looks good but I proposed some improvements for the handling of container_size and maxresults in LibrarySection.search().
|
I think this should be good to go. @Montellese ? |
| raise NotFound('Unable to find elem: cls=%s, attrs=%s' % (clsname, kwargs)) | ||
|
|
||
| def fetchItems(self, ekey, cls=None, **kwargs): | ||
| def fetchItems(self, ekey, cls=None, container_start=None, container_size=None, **kwargs): |
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.
How is it possible now to pass container_start and container_size through e.g. LibrarySection.all()? Before it was possible through **kwargs but now it would have to be passed through explicitly which is currently not the case.
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.
Kwargs can replace keyword arguments. We still test for this.
Add some test that verify that we cant get in a enless loop and handle container_start corrently.
|
@Montellese Wanna take a look before i hit merge? |
Montellese
left a comment
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.
Looks good, thanks!
Now we still 1 more http call then we need as we just asks for any data until the subresult is empty.If we override fetch item we could use totalSize to check if we have all possible items or not.