virtual int compare(const ExternalSortDatum& l, const ExternalSortDatum& r) const { int x = oldCompare(l.first, r.first, _ordering); if (x) { return x; } return l.second.compare(r.second); }
int operator() (const Data& l, const Data& r) const { int x = (_version == 1 ? l.first.woCompare(r.first, _ordering, /*considerfieldname*/false) : oldCompare(l.first, r.first, _ordering)); if (x) { return x; } return l.second.compare(r.second); }
// woEqual could be made faster than woCompare but this is for backward compatibility so not worth a big effort bool KeyBson::woEqual(const KeyBson& r) const { return oldCompare(_o, r._o, nullOrdering) == 0; }
/* old style compares: - dates are unsigned - strings no nulls */ int KeyBson::woCompare(const KeyBson& r, const Ordering &o) const { return oldCompare(_o, r._o, o); }
int IndexInterfaceImpl< V0 >::keyCompare(const BSONObj& l, const BSONObj& r, const Ordering &ordering) { return oldCompare(l, r, ordering); }