diff options
author | Aaron <aaron@10gen.com> | 2009-03-02 11:31:13 -0500 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-03-02 11:31:13 -0500 |
commit | dad75855e8ff7509559c10efe1fd5d1cbb52655e (patch) | |
tree | c4a69bf491c6001e2b3164f0f2e635d0d50bd9d1 /db/query.cpp | |
parent | 253a49d2a135d6542d89750586635000016d468f (diff) | |
download | mongo-dad75855e8ff7509559c10efe1fd5d1cbb52655e.tar.gz |
Add KeyValJSMatcher
Diffstat (limited to 'db/query.cpp')
-rw-r--r-- | db/query.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/db/query.cpp b/db/query.cpp index 0a1daf1fbd7..2d8174248d8 100644 --- a/db/query.cpp +++ b/db/query.cpp @@ -58,7 +58,7 @@ namespace mongo { } virtual void init() { c_ = qp().newCursor(); - matcher_.reset( new JSMatcher( qp().query(), c_->indexKeyPattern() ) ); + matcher_.reset( new JSMatcher( qp().query() ) ); } virtual void next() { if ( !c_->ok() ) { @@ -130,7 +130,7 @@ namespace mongo { if( !c->ok() ) return nDeleted; - JSMatcher matcher(pattern, c->indexKeyPattern()); + JSMatcher matcher(pattern); do { Record *r = c->_current(); @@ -268,7 +268,7 @@ namespace mongo { if ( !c_->ok() ) setComplete(); else - matcher_.reset( new JSMatcher( pattern, c_->indexKeyPattern() ) ); + matcher_.reset( new JSMatcher( pattern ) ); } virtual void next() { if ( !c_->ok() ) { @@ -593,7 +593,7 @@ namespace mongo { if ( qp().exactKeyMatch() && fields_.empty() ) bc_ = dynamic_cast< BtreeCursor* >( c_.get() ); else - matcher_.reset( new JSMatcher( query_, c_->indexKeyPattern() ) ); + matcher_.reset( new KeyValJSMatcher( query_, c_->indexKeyPattern() ) ); } virtual void next() { if ( !c_->ok() ) { @@ -649,7 +649,7 @@ namespace mongo { BSONObj query_; set< string > fields_; BtreeCursor *bc_; - auto_ptr< JSMatcher > matcher_; + auto_ptr< KeyValJSMatcher > matcher_; BSONObj firstMatch_; }; @@ -702,7 +702,7 @@ namespace mongo { c_ = qp().newCursor(); - matcher_.reset(new JSMatcher(qp().query(), c_->indexKeyPattern())); + matcher_.reset(new JSMatcher(qp().query())); if ( qp().scanAndOrderRequired() ) { ordering_ = true; |