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

Add XOR operator to $bit

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.5.2
    • 2.0.1
    • Write Ops
    • None

    Description

      The XOR operator is lacking from the $bit operation. Useful for situations where you want to flip a flag :

      {flag: 1}

      db.col.update(

      {..}

      , {$bit:{flag:

      {xor:1}

      }})

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            remonvv Remon van Vliet
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: