#include <queryutil.h>
Public Member Functions | |
FieldRangeSet (const char *ns, const BSONObj &query, bool optimize=true) | |
string | getSpecial () const |
bool | hasRange (const char *fieldName) const |
BoundList | indexBounds (const BSONObj &keyPattern, int direction) const |
bool | matchPossible () const |
int | nNontrivialRanges () const |
const char * | ns () const |
const FieldRangeSet & | operator&= (const FieldRangeSet &other) |
const FieldRangeSet & | operator-= (const FieldRangeSet &other) |
QueryPattern | pattern (const BSONObj &sort=BSONObj()) const |
FieldRange & | range (const char *fieldName) |
const FieldRange & | range (const char *fieldName) const |
BSONObj | simplifiedQuery (const BSONObj &fields=BSONObj()) const |
FieldRangeSet * | subset (const BSONObj &fields) const |
Private Member Functions | |
void | appendQueries (const FieldRangeSet &other) |
void | makeEmpty () |
void | processOpElement (const char *fieldName, const BSONElement &f, bool isNot, bool optimize) |
void | processQueryField (const BSONElement &e, bool optimize) |
Static Private Member Functions | |
static FieldRange & | trivialRange () |
Private Attributes | |
const char * | _ns |
vector< BSONObj > | _queries |
map< string, FieldRange > | _ranges |
Static Private Attributes | |
static FieldRange * | trivialRange_ |
Friends | |
class | FieldRangeOrSet |
class | FieldRangeVector |
Definition at line 199 of file queryutil.h.
mongo::FieldRangeSet::FieldRangeSet | ( | const char * | ns, | |
const BSONObj & | query, | |||
bool | optimize = true | |||
) |
void mongo::FieldRangeSet::appendQueries | ( | const FieldRangeSet & | other | ) | [inline, private] |
Definition at line 329 of file queryutil.h.
string mongo::FieldRangeSet::getSpecial | ( | ) | const |
bool mongo::FieldRangeSet::hasRange | ( | const char * | fieldName | ) | const [inline] |
Definition at line 204 of file queryutil.h.
void mongo::FieldRangeSet::makeEmpty | ( | ) | [inline, private] |
Definition at line 334 of file queryutil.h.
bool mongo::FieldRangeSet::matchPossible | ( | ) | const [inline] |
Definition at line 231 of file queryutil.h.
int mongo::FieldRangeSet::nNontrivialRanges | ( | ) | const [inline] |
Definition at line 220 of file queryutil.h.
const char* mongo::FieldRangeSet::ns | ( | ) | const [inline] |
Definition at line 228 of file queryutil.h.
const FieldRangeSet& mongo::FieldRangeSet::operator&= | ( | const FieldRangeSet & | other | ) | [inline] |
Definition at line 293 of file queryutil.h.
const FieldRangeSet& mongo::FieldRangeSet::operator-= | ( | const FieldRangeSet & | other | ) | [inline] |
Definition at line 251 of file queryutil.h.
QueryPattern mongo::FieldRangeSet::pattern | ( | const BSONObj & | sort = BSONObj() |
) | const |
void mongo::FieldRangeSet::processOpElement | ( | const char * | fieldName, | |
const BSONElement & | f, | |||
bool | isNot, | |||
bool | optimize | |||
) | [private] |
void mongo::FieldRangeSet::processQueryField | ( | const BSONElement & | e, | |
bool | optimize | |||
) | [private] |
FieldRange& mongo::FieldRangeSet::range | ( | const char * | fieldName | ) | [inline] |
Definition at line 214 of file queryutil.h.
const FieldRange& mongo::FieldRangeSet::range | ( | const char * | fieldName | ) | const [inline] |
Definition at line 208 of file queryutil.h.
FieldRangeSet* mongo::FieldRangeSet::subset | ( | const BSONObj & | fields | ) | const |
return | - A new FieldRangeSet based on this FieldRangeSet, but with only a subset of the fields. | |
fields | - Only fields which are represented as field names in this object will be included in the returned FieldRangeSet. |
static FieldRange& mongo::FieldRangeSet::trivialRange | ( | ) | [static, private] |
friend class FieldRangeOrSet [friend] |
Definition at line 201 of file queryutil.h.
friend class FieldRangeVector [friend] |
Definition at line 202 of file queryutil.h.
const char* mongo::FieldRangeSet::_ns [private] |
Definition at line 344 of file queryutil.h.
vector< BSONObj > mongo::FieldRangeSet::_queries [private] |
Definition at line 346 of file queryutil.h.
map< string, FieldRange > mongo::FieldRangeSet::_ranges [mutable, private] |
Definition at line 343 of file queryutil.h.
FieldRange* mongo::FieldRangeSet::trivialRange_ [static, private] |
Definition at line 341 of file queryutil.h.