22 #include "mongo/bson/bsonelement.h"
23 #include "mongo/client/export_macros.h"
27 int getGtLtOp(
const BSONElement& e);
49 typedef std::set<BSONObj, BSONObjCmp> BSONObjSet;
51 enum FieldCompareResult {
72 #define BSON(x) ((::mongo::BSONObjBuilder(64) << x).obj())
80 #define BSON_ARRAY(x) ((::mongo::BSONArrayBuilder() << x).arr())
123 explicit Label(
const char* l) : l_(l) {}
170 BSONBinData(
const void* d,
int l, BinDataType t) : data(d), length(l), type(t) {}
229 bool subobjStarted()
const {
230 return _fieldName != 0;
248 bool haveSubobj()
const {
249 return _subobj.get() != 0;
252 std::auto_ptr<BSONObjBuilder> _subobj;
263 for (
int i = 0; i < SIZE; i++)
271 _pos = (_pos + 1) % SIZE;
279 for (
int i = 0; i < SIZE; i++) {
293 bool fieldsMatch(
const BSONObj& lhs,
const BSONObj& rhs);
Definition: bsonmisc.h:155
Definition: bsonmisc.h:143
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
Definition: bsonmisc.h:35
Definition: bsonmisc.h:122
Object ID type.
Definition: oid.h:60
int woCompare(const BSONObj &r, const Ordering &o, bool considerFieldName=true) const
wo='well ordered'.
Definition: bsonmisc.h:86
used in conjuction with BSONObjBuilder, allows for proper buffer size to prevent crazy memory usage ...
Definition: bsonmisc.h:259
Definition: bsonmisc.h:29
Definition: bsonmisc.h:100
Utility for creating a BSONObj.
Definition: bsonobjbuilder.h:53
Definition: bsonmisc.h:149
Definition: bsonmisc.h:114
Definition: bsonmisc.h:107
int getSize() const
right now choosing largest size
Definition: bsonmisc.h:277
Definition: bsonmisc.h:169
Definition: bsonmisc.h:93
Definition: bsonmisc.h:162
Definition: bsonmisc.h:177
BSONElement represents an "element" in a BSONObj.
Definition: bsonelement.h:55
Definition: bsonmisc.h:116
int woCompare(const BSONElement &e, bool considerFieldName=true) const
Well ordered comparison.
Definition: bsonmisc.h:120
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary represent...
Definition: bsonobj.h:78
Definition: bsonmisc.h:208