BSONElement::getGtLtOp() is used in query parsing to map the field name of a BSONElement to a BSONObj::MatchType (an enum which lists $-prefixed operators in the query predicate language).
Currently, the mapping is implemented as a large if-else if-else block. Instead, we should use a StringMap. This should make the code more readable, and probably faster.
- is related to
-
SERVER-19565 BSONElement::getGtLtOp() should include all query operators
- Closed
- related to
-
SERVER-29814 Move BSONObj::MatchType and BSONElement::getGtLtOp() out of the BSON classes / library
- Closed