Skip to content

Move sort and where to functions - #1194

Closed
jsolbrig wants to merge 2 commits into
pyeve:masterfrom
jsolbrig:move_sort_and_where_to_functions
Closed

Move sort and where to functions#1194
jsolbrig wants to merge 2 commits into
pyeve:masterfrom
jsolbrig:move_sort_and_where_to_functions

Conversation

@jsolbrig

Copy link
Copy Markdown
Contributor

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.

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 pull request Jan 26, 2019
@nicolaiarocci

Copy link
Copy Markdown
Member

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

Development

Successfully merging this pull request may close these issues.

2 participants