0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

SERVER-109 comments/cleanup

This commit is contained in:
Aaron 2010-06-03 12:50:49 -07:00
parent 43554f2403
commit d7f94346d0
2 changed files with 7 additions and 4 deletions

View File

@ -134,8 +134,6 @@ namespace mongo {
return op <= BSONObj::LTE ? -1 : 1;
}
// Only specify constrainIndexKey if matches() will be called with
// index keys having empty string field names.
Matcher(const BSONObj &pattern, bool subMatcher = false);
~Matcher();
@ -160,6 +158,8 @@ namespace mongo {
bool sameCriteriaCount( const Matcher &other ) const;
private:
// Only specify constrainIndexKey if matches() will be called with
// index keys having empty string field names.
Matcher( const Matcher &other, const BSONObj &constrainIndexKey );
void addBasic(const BSONElement &e, int c, bool isNot) {
@ -229,7 +229,6 @@ namespace mongo {
shared_ptr< Matcher > _docMatcher;
Matcher _keyMatcher;
bool _needRecord;
bool _orPopped;
};
} // namespace mongo

View File

@ -85,6 +85,7 @@ namespace mongo {
optimal_ = true;
_type = index_->getSpec().getType();
massert( 13040 , (string)"no type for special: " + _special , _type );
// hopefully safe to use original query in these contexts - don't think we can mix special with $or clause separation yet
scanAndOrderRequired_ = _type->scanAndOrderRequired( _originalQuery , order );
return;
}
@ -180,8 +181,10 @@ namespace mongo {
shared_ptr<Cursor> QueryPlan::newCursor( const DiskLoc &startLoc , int numWanted ) const {
if ( _type )
if ( _type ) {
// hopefully safe to use original query in these contexts - don't think we can mix type with $or clause separation yet
return _type->newCursor( _originalQuery , order_ , numWanted );
}
if ( !fbs_.matchPossible() ){
if ( fbs_.nNontrivialRanges() )
@ -587,6 +590,7 @@ namespace mongo {
_i(),
_honorRecordedPlan( honorRecordedPlan ),
_bestGuessOnly() {
// TODO add special/type check
// eventually implement (some of?) these
if ( !order.isEmpty() || ( hint && !hint->eoo() ) || !min.isEmpty() || !max.isEmpty() ) {
_or = false;