Mongodb utilities.
Improved BSONObj Builder Macros | |
---|---|
BSONS |
A macro to build a BSONObj of custom initial buffer size from a stream to reduce memory allocation times. e.g.,
with auto-generated object id:
when size is 64, it is the same as:
The labels GT, GTE, LT, LTE, NE can be helpful for stream-oriented construction of a BSONObj, particularly when assembling a Query. For example,
|
QUERYS |
|
BSONS_ARRAY |
Use BSONS_ARRAY macro like BSONS macro, but without keys
|
Debug Helpers | |
SHOW_BSON_BOB |
Print bson::bob object content in DEBUG mode. |
SHOW_BSON_BO |
Print bson::bo object content in DEBUG mode. |
SHOW_BSON_BE |
Print bson::be object content in DEBUG mode. |
SHOW_MONGODB_LASTERR |
Print a mongodb connection's last error in DEBUG mode. |