$true or $truthValue query operator

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      db.foo.remove({temporary: {$truthValue: true}})

      Probably should share semantics (but not name) with BSONElement::trueValue() where 0, false, null, undefined, and missing are false and everything else is true. Alternatively we may want to treat empty Strings, Objects, and Arrays as false like python.

      This can be approximated with an $in/$nin query, but I think it would be nice to have a proper query operator.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: