create an $eq operator for queries that works similar to $gte and $lte

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • 2.5.0
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We are writing a simple ORM for python called maroon. (http://github.com/nod/maroon) Our library builds mongo queries dynamically from python code that looks like this:
      results = Things.find((j==3)&(k>10))

      Right now we have to treat equality as a special case when we do ands and ors:
      db.things.find({j: 3, k: {$gt: 10} });

      It it would make our code simpler and more consistent if $eq was an operator. For example:
      db.things.find({j: {$eq: 3}, k: {$gt: 10} });

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Jeff McGee
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: