Change BSONElement::getGtLtOp() to use StringMap rather than a large if-else

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 3.1.7
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Quint Iteration 7
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Qingyang Chen (Inactive)
            Reporter:
            David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: