Storage Engine API
mongo::KeyBson Class Reference

Key class for precomputing a small format index key that is denser than a traditional BSONObj. More...

#include <key.h>

Detailed Description

Key class for precomputing a small format index key that is denser than a traditional BSONObj.

KeyBson is a legacy wrapper implementation for old BSONObj style keys for v:0 indexes.

KeyV1 is the new implementation.

Public Member Functions

 KeyBson ()
 
 KeyBson (const char *keyData)
 
 KeyBson (const BSONObj &obj)
 
int woCompare (const KeyBson &r, const Ordering &o) const
 
BSONObj toBson () const
 
std::string toString () const
 
int dataSize () const
 
const char * data () const
 
BSONElement _firstElement () const
 
bool isCompactFormat () const
 
bool woEqual (const KeyBson &r) const
 
void assign (const KeyBson &rhs)
 
bool isValid () const
 

Private Attributes

BSONObj _o
 

Constructor & Destructor Documentation

◆ KeyBson() [1/3]

mongo::KeyBson::KeyBson ( )
inline

◆ KeyBson() [2/3]

mongo::KeyBson::KeyBson ( const char *  keyData)
inlineexplicit

◆ KeyBson() [3/3]

mongo::KeyBson::KeyBson ( const BSONObj &  obj)
inlineexplicit

Member Function Documentation

◆ _firstElement()

BSONElement mongo::KeyBson::_firstElement ( ) const
inline

◆ assign()

void mongo::KeyBson::assign ( const KeyBson rhs)
inline

◆ data()

const char* mongo::KeyBson::data ( ) const
inline

◆ dataSize()

int mongo::KeyBson::dataSize ( ) const
inline

◆ isCompactFormat()

bool mongo::KeyBson::isCompactFormat ( ) const
inline

◆ isValid()

bool mongo::KeyBson::isValid ( ) const
inline

◆ toBson()

BSONObj mongo::KeyBson::toBson ( ) const
inline

◆ toString()

std::string mongo::KeyBson::toString ( ) const
inline

◆ woCompare()

int mongo::KeyBson::woCompare ( const KeyBson r,
const Ordering &  o 
) const

◆ woEqual()

bool mongo::KeyBson::woEqual ( const KeyBson r) const

Member Data Documentation

◆ _o

BSONObj mongo::KeyBson::_o
private

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