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

$bit update operator should support BinData type

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • Labels:
      None
    • Query Execution

      The $bit update bitwise operator currently supports 32- and 64-byte data integers. It would be helpful to allow bitwise operations for BinData types as well.

      The existing operators AND, OR, and XOR could be extended to take in a BinData type and modify the original BinData as appropriate.

      An additional SET or CLEAR operator might also be useful in addition to or as a replacement for the AND, OR, and XOR operators when operating on BinData. This would allow the server to avoid converting chunks of data by simply updating the appropriate byte. For example, the following would set the 124th bit in the field "bloom" of type BinData.

      { $bin: { bloom:

      { set: 124 }

      } }

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            jtv4k Justin
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: