-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Write Ops
-
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 }} }