Skip to content

DATAMONGO-1141 - Add support for $push $sort in Update. #405

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

Closed

Conversation

pavelvodrazka
Copy link
Contributor

Sorting update modifiers added. DocumentSort for sorting arrays by document fields and ValueSort for sorting arrays by element values.

@pavelvodrazka
Copy link
Contributor Author

Or I can refactor it into a single modifier with one constructor accepting Sort and another accepting Direction, if you find it more appropriate.

@mp911de
Copy link
Member

mp911de commented Dec 1, 2016

Hi @pavelvodrazka, thanks for this PR. The code looks pretty decent. Have you signed the CLA?

Having one SortModifier class instead of three classes is sufficient. We're heading towards a release tomorrow. It would be great if you find some chance to change the PR otherwise I can take the PR from here and apply the refactoring.

@mp911de mp911de self-assigned this Dec 1, 2016
@pavelvodrazka
Copy link
Contributor Author

Hi Mark, thanks for review. Yes, I have signed the CLA.

I'm going to refactor my changes and submit new PR in few minutes.

@pavelvodrazka pavelvodrazka force-pushed the issue/DATAMONGO-1141 branch 2 times, most recently from a531d6e to 6bb0249 Compare December 1, 2016 14:58
@pavelvodrazka
Copy link
Contributor Author

pavelvodrazka commented Dec 1, 2016

@mp911de I have pushed refactored modifier. Please revise.

Sorting update modifier added. Supports sorting arrays by document 
fields and element values.
@mp911de
Copy link
Member

mp911de commented Dec 2, 2016

Thanks a lot. I'll take the PR from here.

odrotbohm pushed a commit that referenced this pull request Dec 2, 2016
Sorting update modifier added. Supports sorting arrays by document fields and element values.

Original pull request: #405.
odrotbohm pushed a commit that referenced this pull request Dec 2, 2016
Add property to field name mapping for Sort orders by moving Sort mapping to UpdateMapper. Fix typo. Add JavaDoc. Reformat code. Remove trailing whitespaces.

Original pull request: #405.
odrotbohm added a commit that referenced this pull request Dec 2, 2016
Aligned assertion messages for consistency. Fixed imports in  UpdateMapperUnitTests.

Original pull request: #405.
odrotbohm pushed a commit that referenced this pull request Dec 2, 2016
Sorting update modifier added. Supports sorting arrays by document fields and element values.

Original pull request: #405.
odrotbohm pushed a commit that referenced this pull request Dec 2, 2016
Add property to field name mapping for Sort orders by moving Sort mapping to UpdateMapper. Fix typo. Add JavaDoc. Reformat code. Remove trailing whitespaces.

Original pull request: #405.
odrotbohm added a commit that referenced this pull request Dec 2, 2016
Aligned assertion messages for consistency. Fixed imports in  UpdateMapperUnitTests.

Original pull request: #405.
@odrotbohm
Copy link
Member

That's polished, merged and forward-ported.

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.

3 participants