Skip to content
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

Move sort and where to functions #1194

Closed

Conversation

@jsolbrig
Copy link
Contributor

@jsolbrig jsolbrig commented Sep 20, 2018

Purpose

Make the parsing of req.sort and req.where easily reusable to support addition of where functionality to DELETE and PATCH requests on resource endpoints. These updates will be provided in subsequent pull requests.

Changes

These changes simply copy functionality for parsing req.sort and req.where from Mongo.find() to two new methods: Mongo._convert_sort_request_to_dict() and Mongo._convert_where_request_to_dict().

The new functions are exact copies of the code that had been in Mongo.find() and introduce no new code.

Tests

No new code has been added, code has only been moved. No new tests are required and all tests pass for Python 2.7.15, 3.4.6, 3.5.6, 3.6.6, and Pypy with the exception of the test referenced in #1193.

jsolbrig added 2 commits Sep 20, 2018
Moved new functions inside Mongo class to allow them to access class attributes.
@nicolaiarocci nicolaiarocci added this to the 0.8.2 milestone Jan 24, 2019
nicolaiarocci added a commit that referenced this issue Jan 26, 2019
@nicolaiarocci
Copy link
Member

@nicolaiarocci nicolaiarocci commented Jan 26, 2019

Rebased and merged, see 7ddd46a

PS: I am terribly sorry for the long wait. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants