20#include "mongo/bson/bsonobj.h"
62 : _name(name), _t(t) { }
64 const T& value()
const {
return _t; }
65 const std::string& name()
const {
return _name; }
76 : _name(name), _defaultSet(
false) {}
78 BSONField(
const std::string& name,
const T& defaultVal)
79 : _name(name), _default(defaultVal) , _defaultSet(
true) {}
89 const std::string& name()
const {
93 const T& getDefault()
const {
97 bool hasDefault()
const {
101 std::string operator()()
const {
108 return query(
"$gt", t);
112 return query(
"$lt", t);
116 return query(
"$ne", t);
A BSONField holds the name and the type intended for a given BSON element.
Definition bson_field.h:59
Definition bson_field.h:73
the main MongoDB namespace
Definition bulk_operation_builder.h:24