diff options
author | Dwight <dmerriman@gmail.com> | 2008-11-18 15:47:37 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-11-18 15:47:37 -0500 |
commit | ede1f1e2ba3faaacfa1d315c089aee1210bbc7dd (patch) | |
tree | 565637bdce00e029bedcf5b1b93a2ace8d38d5f2 /db/btree.h | |
parent | 580369978b122f677c63d698d594f655d9c84d48 (diff) | |
download | mongo-ede1f1e2ba3faaacfa1d315c089aee1210bbc7dd.tar.gz |
big change for stopOnMiss
Diffstat (limited to 'db/btree.h')
-rw-r--r-- | db/btree.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/db/btree.h b/db/btree.h index 05c0c7f62ef..0fddc2faac4 100644 --- a/db/btree.h +++ b/db/btree.h @@ -171,12 +171,13 @@ private: class BtreeCursor : public Cursor { friend class BtreeBucket; +// BSONObj query; // the query we are working on in association with the cursor -- see noMoreMatches() public: - BtreeCursor(IndexDetails&, BSONObj& startKey, int direction, bool stopmiss); + BtreeCursor(IndexDetails&, BSONObj& startKey, int direction, BSONObj& query); virtual bool ok() { return !bucket.isNull(); } bool eof() { return !ok(); } virtual bool advance(); - virtual bool tempStopOnMiss() { return stopmiss; } + virtual void noteLocation(); // updates keyAtKeyOfs... virtual void checkLocation(); @@ -190,6 +191,11 @@ public: assert( !bucket.isNull() ); return bucket.btree()->keyNode(keyOfs); } + BSONObj currKey() { return currKeyNode().key; } + + virtual BSONObj indexKeyPattern() { + return indexDetails.keyPattern(); + } virtual void aboutToDeleteBucket(const DiskLoc& b) { if( bucket == b ) @@ -202,7 +208,7 @@ public: virtual string toString() { string s = string("BtreeCursor ") + indexDetails.indexName(); if( direction < 0 ) s += " reverse"; - if( stopmiss ) s += " stopmiss"; + //if( stopmiss ) s += " stopmiss"; return s; } @@ -212,7 +218,6 @@ private: DiskLoc bucket; int keyOfs; int direction; // 1=fwd,-1=reverse - bool stopmiss; BSONObj keyAtKeyOfs; // so we can tell if things moved around on us between the query and the getMore call DiskLoc locAtKeyOfs; }; |