示例#1
0
 bool QueryResponseBuilder::addMatch() {
     if ( !currentMatches() ) {
         return false;
     }
     if ( !chunkMatches() ) {
         return false;
     }
     bool orderedMatch = false;
     bool match = _builder->handleMatch( orderedMatch );
     _explain->noteIterate( match, orderedMatch, true, false );
     return match;
 }
示例#2
0
文件: query.cpp 项目: masa0114/mongo
 bool QueryResponseBuilder::addMatch() {
     if ( !currentMatches() ) {
         return false;
     }
     if ( !chunkMatches() ) {
         return false;
     }
     bool bufferedMatch = _builder->handleMatch();
     _explain->noteIterate( bufferedMatch, true, false );
     if ( bufferedMatch ) {
         ++_bufferedMatches;
     }
     return true;
 }
示例#3
0
文件: query.cpp 项目: enlyn/mongo
    bool QueryResponseBuilder::addMatch() {
        ResultDetails resultDetails;

        if ( _parsedQuery.getFields() && _parsedQuery.getFields()->getArrayOpType() == Projection::ARRAY_OP_POSITIONAL ) {
            // field projection specified, and contains an array operator
            resultDetails.matchDetails.requestElemMatchKey();
        }

        bool match =
                currentMatches( &resultDetails ) &&
                chunkMatches( &resultDetails ) &&
                _builder->handleMatch( &resultDetails );

        _explain->noteIterate( resultDetails );
        return match;
    }