[SERVER-503] $bit operators Created: 21/Dec/09  Updated: 12/Jul/16  Resolved: 26/Jan/11

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 1.3.0

Type: New Feature Priority: Minor - P4
Reporter: Eliot Horowitz (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

{ $bit : { x :

{ "and" : 5 , "or" : 10 }

} }



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Jan/11 ]

An example:

> db.foo.save(

{ x : new NumberLong(1) }

)
> db.foo.update( {} , { $bit : { x :

{ or : new NumberLong(4) }

} } )
> db.foo.findOne()

{ "_id" : ObjectId("4d3fd0aeec5855af36412c85"), "x" : NumberLong(5) }
Comment by Dwight Merriman [ 26/Jan/11 ]

doesn't seem to work, or else is so nonobvious i can't do it.

Comment by Dwight Merriman [ 30/Jan/10 ]

would likely need for both querying and update, not just for updates

Comment by auto [ 21/Dec/09 ]

Author:

{'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: start work on bit operators SERVER-503
only ugly syntax works and not idempotent yet
http://github.com/mongodb/mongo/commit/62a4aef8fd2ce7c3cf1b7ecded73a931887b0d18

Generated at Thu Feb 08 02:54:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.