-
Notifications
You must be signed in to change notification settings - Fork 12
Prevent discrepancy between the original sort and the cursor sort #30
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
Prevent discrepancy between the original sort and the cursor sort #30
Conversation
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.
I'll add the same mechanism to the other *::Scrollable
classes once we'll agree on an implementation for Mongoid::Criteria::Scrollable
.
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 LGTM.
A possibly better word than "different" is "mismatched", I think it's more idiomatic. Up to you.
Please also update README describing what happens in this case, CHANGELOG and UPGRADING.md.
Pick whether you think this is a breaking change or a fix, and either increment the minor version or the major version as part of this PR.
Ready for a new round of review, feel free to update any wording! |
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.
Almost there.
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.
LGTM, needs a rebase
a77c52c
to
cebf579
Compare
👍 merged |
As seen in #28 (comment) (2c.), we want to prevent discrepancies between the cursor sort options and the original sort options.
This PR raises a new
Mongoid::Scroll::Errors::DifferentSortFieldsError
in case of mismatch:It was inspired from
raise_multiple_sort_fields_error if multiple_sort_fields?
.