Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4486

$true or $truthValue query operator

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • Query Optimization

    Description

      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.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: