mongo::BtreeCursor Class Reference

#include <btree.h>

Inheritance diagram for mongo::BtreeCursor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Record_current ()
const _KeyNode_currKeyNode () const
virtual void aboutToDeleteBucket (const DiskLoc &b)
virtual bool advance ()
 BtreeCursor (NamespaceDetails *_d, int _idxNo, const IndexDetails &_id, const shared_ptr< FieldRangeVector > &_bounds, int _direction)
 BtreeCursor (NamespaceDetails *_d, int _idxNo, const IndexDetails &, const BSONObj &startKey, const BSONObj &endKey, bool endKeyInclusive, int direction)
virtual void checkLocation ()
virtual BSONObj current ()
virtual BSONObj currKey () const
const KeyNode currKeyNode () const
virtual DiskLoc currLoc ()
void forgetEndKey ()
const DiskLoc getBucket () const
virtual bool getsetdup (DiskLoc loc)
virtual BSONObj indexKeyPattern ()
virtual bool isMultiKey () const
virtual CoveredIndexMatchermatcher () const
virtual bool modifiedKeys () const
virtual void noteLocation ()
virtual long long nscanned ()
virtual bool ok ()
virtual BSONObj prettyIndexBounds () const
BSONObj prettyKey (const BSONObj &key) const
virtual DiskLoc refLoc ()
virtual void setMatcher (shared_ptr< CoveredIndexMatcher > matcher)
virtual bool supportGetMore ()
virtual bool supportYields ()
virtual string toString ()

Private Member Functions

void advanceTo (const BSONObj &keyBegin, int keyBeginLen, bool afterKey, const vector< const BSONElement * > &keyEnd, const vector< bool > &keyEndInclusive)
void audit ()
void checkEnd ()
void init ()
void skipAndCheck ()
bool skipOutOfRangeKeysAndCheckEnd ()
bool skipUnusedKeys (bool mayJump)

Private Attributes

const shared_ptr
< FieldRangeVector
_bounds
auto_ptr
< FieldRangeVector::Iterator
_boundsIterator
const int _direction
set< DiskLoc_dups
bool _endKeyInclusive
bool _independentFieldRanges
shared_ptr< CoveredIndexMatcher_matcher
bool _multikey
long long _nscanned
const BSONObj _order
const Ordering _ordering
const IndexSpec_spec
DiskLoc bucket
NamespaceDetails *const d
BSONObj endKey
const int idxNo
const IndexDetailsindexDetails
BSONObj keyAtKeyOfs
int keyOfs
DiskLoc locAtKeyOfs
BSONObj startKey

Friends

class BtreeBucket

Detailed Description

Definition at line 448 of file btree.h.


Constructor & Destructor Documentation

mongo::BtreeCursor::BtreeCursor ( NamespaceDetails _d,
int  _idxNo,
const IndexDetails ,
const BSONObj startKey,
const BSONObj endKey,
bool  endKeyInclusive,
int  direction 
)
mongo::BtreeCursor::BtreeCursor ( NamespaceDetails _d,
int  _idxNo,
const IndexDetails _id,
const shared_ptr< FieldRangeVector > &  _bounds,
int  _direction 
)

Member Function Documentation

virtual Record* mongo::BtreeCursor::_current (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 498 of file btree.h.

const _KeyNode& mongo::BtreeCursor::_currKeyNode (  )  const [inline]

Definition at line 477 of file btree.h.

virtual void mongo::BtreeCursor::aboutToDeleteBucket ( const DiskLoc b  )  [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 491 of file btree.h.

virtual bool mongo::BtreeCursor::advance (  )  [virtual]

Implements mongo::Cursor.

void mongo::BtreeCursor::advanceTo ( const BSONObj keyBegin,
int  keyBeginLen,
bool  afterKey,
const vector< const BSONElement * > &  keyEnd,
const vector< bool > &  keyEndInclusive 
) [private]

if afterKey is true, we want the first key with values of the keyBegin fields greater than keyBegin

void mongo::BtreeCursor::audit (  )  [private]

selective audits on construction

void mongo::BtreeCursor::checkEnd (  )  [private]
virtual void mongo::BtreeCursor::checkLocation (  )  [virtual]

Reimplemented from mongo::Cursor.

virtual BSONObj mongo::BtreeCursor::current (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 499 of file btree.h.

virtual BSONObj mongo::BtreeCursor::currKey (  )  const [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 488 of file btree.h.

const KeyNode mongo::BtreeCursor::currKeyNode (  )  const [inline]

Definition at line 483 of file btree.h.

virtual DiskLoc mongo::BtreeCursor::currLoc (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 496 of file btree.h.

void mongo::BtreeCursor::forgetEndKey (  )  [inline]

Definition at line 520 of file btree.h.

const DiskLoc mongo::BtreeCursor::getBucket (  )  const [inline]

for debugging only

Definition at line 529 of file btree.h.

virtual bool mongo::BtreeCursor::getsetdup ( DiskLoc  loc  )  [inline, virtual]

used for multikey index traversal to avoid sending back dups. see Matcher::matches(). if a multikey index traversal: if loc has already been sent, returns true. otherwise, marks loc as sent.

Returns:
true if the loc has not been seen

Implements mongo::Cursor.

Definition at line 466 of file btree.h.

virtual BSONObj mongo::BtreeCursor::indexKeyPattern (  )  [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 489 of file btree.h.

void mongo::BtreeCursor::init (  )  [private]

set initial bucket

virtual bool mongo::BtreeCursor::isMultiKey (  )  const [inline, virtual]

Implements mongo::Cursor.

Definition at line 475 of file btree.h.

virtual CoveredIndexMatcher* mongo::BtreeCursor::matcher (  )  const [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 522 of file btree.h.

virtual bool mongo::BtreeCursor::modifiedKeys (  )  const [inline, virtual]

return true if the keys in the index have been modified from the main doc if you have { a : 1 , b : [ 1 , 2 ] } an index on { a : 1 } would not be modified an index on { b : 1 } would be since the values of the array are put in the index not the array

Implements mongo::Cursor.

Definition at line 474 of file btree.h.

virtual void mongo::BtreeCursor::noteLocation (  )  [virtual]

Reimplemented from mongo::Cursor.

virtual long long mongo::BtreeCursor::nscanned (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 526 of file btree.h.

virtual bool mongo::BtreeCursor::ok (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 452 of file btree.h.

virtual BSONObj mongo::BtreeCursor::prettyIndexBounds (  )  const [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 511 of file btree.h.

BSONObj mongo::BtreeCursor::prettyKey ( const BSONObj key  )  const [inline]

Definition at line 507 of file btree.h.

virtual DiskLoc mongo::BtreeCursor::refLoc (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 497 of file btree.h.

virtual void mongo::BtreeCursor::setMatcher ( shared_ptr< CoveredIndexMatcher matcher  )  [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 524 of file btree.h.

void mongo::BtreeCursor::skipAndCheck (  )  [private]
bool mongo::BtreeCursor::skipOutOfRangeKeysAndCheckEnd (  )  [private]
bool mongo::BtreeCursor::skipUnusedKeys ( bool  mayJump  )  [private]

Our btrees may (rarely) have "unused" keys when items are deleted. Skip past them.

virtual bool mongo::BtreeCursor::supportGetMore (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 456 of file btree.h.

virtual bool mongo::BtreeCursor::supportYields (  )  [inline, virtual]

Implements mongo::Cursor.

Definition at line 457 of file btree.h.

virtual string mongo::BtreeCursor::toString (  )  [inline, virtual]

Reimplemented from mongo::Cursor.

Definition at line 500 of file btree.h.


Friends And Related Function Documentation

friend class BtreeBucket [friend]

Definition at line 550 of file btree.h.


Member Data Documentation

const shared_ptr< FieldRangeVector > mongo::BtreeCursor::_bounds [private]

Definition at line 567 of file btree.h.

Definition at line 568 of file btree.h.

const int mongo::BtreeCursor::_direction [private]

Definition at line 564 of file btree.h.

Definition at line 552 of file btree.h.

Definition at line 557 of file btree.h.

Definition at line 571 of file btree.h.

Definition at line 570 of file btree.h.

Definition at line 558 of file btree.h.

long long mongo::BtreeCursor::_nscanned [private]

Definition at line 572 of file btree.h.

Definition at line 560 of file btree.h.

Definition at line 561 of file btree.h.

Definition at line 569 of file btree.h.

Definition at line 562 of file btree.h.

Definition at line 553 of file btree.h.

Definition at line 556 of file btree.h.

const int mongo::BtreeCursor::idxNo [private]

Definition at line 554 of file btree.h.

Definition at line 559 of file btree.h.

Definition at line 565 of file btree.h.

Definition at line 563 of file btree.h.

Definition at line 566 of file btree.h.

Definition at line 555 of file btree.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:53 2013