-
Type: Epic
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query
-
-
Done
-
Refactor embedded matchers
-
Major Change
Currently embedded matchers are written in an awkward manner, where the matcher takes the complete criteria being matched (which includes the matcher) as the argument, rather than the argument being the argument's matcher. Part of the criteria is then ignored, because it is redundant with the matcher class. There are Matcher classes for $and, $not and $or, but not for $not. Despite there being these matcher classes, there is additional ad-hoc code to handle all of the logical operators in other operators.
This epic will revise the API of embedded matchers to be clear, consistent and extendable, then implement specific features requested for $elemMatch and repair bugs identified along the way (e.g. $exists).
- depends on
-
RUBY-2273 Regexp::Raw cannot be deserialized from YAML
- Closed
-
RUBY-2294 Provide clear exception message when trying to serialize types to BSON that do not define serialization behavior
- Closed
- is duplicated by
-
MONGOID-4786 Add integration tests for embedded matchers
- Closed
-
MONGOID-4792 Refactor existing embedded matchers to have an operator-value API
- Closed
-
MONGOID-4793 Implement $not as a top-level matcher
- Closed
- is related to
-
MONGOID-4908 Range as field-level operator argument generates bogus queries
- Backlog
-
MONGOID-4911 Range expansion must use $elemMatch to ensure both $gte and $lte match the same array element
- Closed
-
MONGOID-4906 Add missing general-purpose operators to embedded matchers
- Closed
- links to