[SERVER-4470] Request NULL support in BSON ans QUERY macro Created: 10/Dec/11  Updated: 05/Nov/15  Resolved: 14/Dec/11

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Improvement Priority: Major - P3
Reporter: Alex Syrnikov Assignee: Kevin Matulef
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

> The labels GT, GTE, LT, LTE, NE can be helpful for stream-oriented construction
> of a BSONObj, particularly when assembling a Query. For example,
> BSON( "a" << GT << 23.4 << NE << 30 << "b" << 2 )

I need NULL support in BSON and QUERY macro, so it call appendNull("field") for
construction BSON("field" << NULL). Stream oriented queries much easy readable and
requires the same CPU time to construction as direct BSONObjBuilder::append() calls.



 Comments   
Comment by Kevin Matulef [ 14/Dec/11 ]

Just added an extension so you can accomplish this using the BSONNULL helper:
BSON("field" << BSONNULL)
this will go out in next release.

Comment by auto [ 14/Dec/11 ]

Author:

{u'login': u'matulef', u'name': u'Kevin Matulef', u'email': u'matulef@gmail.com'}

Message: SERVER-4470 Added BSONNULL driver language construct
Branch: master
https://github.com/mongodb/mongo/commit/38a558ae6ad3e1a498ced23203cd6c837f9bfbfe

Generated at Thu Feb 08 03:06:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.