MongoDB  2.7.0
Public Member Functions | Static Public Member Functions | List of all members
mongo::Ordering Class Reference

A precomputation of a BSON index or sort key pattern. More...

#include <ordering.h>

Public Member Functions

 Ordering (const Ordering &r)
 
void operator= (const Ordering &r)
 
int get (int i) const
 so, for key pattern { a : 1, b : -1 } get(0) == 1 get(1) == -1
 
unsigned descending (unsigned mask) const
 

Static Public Member Functions

static Ordering make (const BSONObj &obj)
 

Detailed Description

A precomputation of a BSON index or sort key pattern.

That is something like: { a : 1, b : -1 } The constructor is private to make conversion more explicit so we notice where we call make(). Over time we should push this up higher and higher.


The documentation for this class was generated from the following file: