20 #include "mongo/bson/bsonobj.h"
21 #include "mongo/bson/bsonobjiterator.h"
45 int get(
int i)
const {
46 return ((1 << i) & bits) ? -1 : 1;
50 unsigned descending(
unsigned mask)
const {
return bits & mask; }
59 static Ordering make(
const BSONObj& obj) {
61 BSONObjIterator k(obj);
64 BSONElement e = k.next();
67 uassert( 13103,
"too many compound keys", n <= 31 );
the main MongoDB namespace
Definition: bulk_operation_builder.h:24
A precomputation of a BSON index or sort key pattern.
Definition: ordering.h:32