22#include "mongo/bson/bsonelement.h"
23#include "mongo/client/export_macros.h"
27int getGtLtOp(
const BSONElement& e);
49typedef std::set<BSONObj, BSONObjCmp> BSONObjSet;
51enum 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++) {
293bool fieldsMatch(
const BSONObj& lhs,
const BSONObj& rhs);
BSONElement represents an "element" in a BSONObj.
Definition bsonelement.h:55
int woCompare(const BSONElement &e, bool considerFieldName=true) const
Well ordered comparison.
Definition bsonmisc.h:208
Utility for creating a BSONObj.
Definition bsonobjbuilder.h:53
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary representa...
Definition bsonobj.h:78
int woCompare(const BSONObj &r, const Ordering &o, bool considerFieldName=true) const
wo='well ordered'.
used in conjuction with BSONObjBuilder, allows for proper buffer size to prevent crazy memory usage
Definition bsonmisc.h:259
int getSize() const
right now choosing largest size
Definition bsonmisc.h:277
Definition bsonmisc.h:120
Object ID type.
Definition oid.h:60
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:169
Definition bsonmisc.h:155
Definition bsonmisc.h:149
Definition bsonmisc.h:177
Definition bsonmisc.h:162
Definition bsonmisc.h:143
Definition bsonmisc.h:122
Definition bsonmisc.h:116
Definition bsonmisc.h:114
Definition bsonmisc.h:100
Definition bsonmisc.h:107