Ejemplo n.º 1
0
void ElemMatchValueMatchExpression::debugString(StringBuilder& debug, int level) const {
    _debugAddSpace(debug, level);
    debug << path() << " $elemMatch (value)";

    MatchExpression::TagData* td = getTag();
    if (NULL != td) {
        debug << " ";
        td->debugString(&debug);
    }
    debug << "\n";
    for (unsigned i = 0; i < _subs.size(); i++) {
        _subs[i]->debugString(debug, level + 1);
    }
}
Ejemplo n.º 2
0
void TextMatchExpressionBase::debugString(StringBuilder& debug, int level) const {
    const fts::FTSQuery& ftsQuery = getFTSQuery();
    _debugAddSpace(debug, level);
    debug << "TEXT : query=" << ftsQuery.getQuery() << ", language=" << ftsQuery.getLanguage()
          << ", caseSensitive=" << ftsQuery.getCaseSensitive()
          << ", diacriticSensitive=" << ftsQuery.getDiacriticSensitive() << ", tag=";
    MatchExpression::TagData* td = getTag();
    if (NULL != td) {
        td->debugString(&debug);
    } else {
        debug << "NULL";
    }
    debug << "\n";
}
Ejemplo n.º 3
0
    void AllElemMatchOp::debugString( StringBuilder& debug, int level ) const {
        _debugAddSpace( debug, level );
        debug << _path << " AllElemMatchOp:";
        MatchExpression::TagData* td = getTag();
        if (NULL != td) {
            debug << " ";
            td->debugString(&debug);
        }
        debug << "\n";
        for ( size_t i = 0; i < _list.size(); i++ ) {
            _list[i]->debugString( debug, level + 1);
        }

    }
Ejemplo n.º 4
0
 void ComparisonMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << _path << " ";
     switch ( matchType() ) {
     case LT: debug << "$lt"; break;
     case LTE: debug << "$lte"; break;
     case EQ: debug << "=="; break;
     case GT: debug << "$gt"; break;
     case GTE: debug << "$gte"; break;
     case NE: debug << "$ne"; break;
     default: debug << " UNKNOWN - should be impossible"; break;
     }
     debug << " " << _rhs.toString( false ) << "\n";
 }
void InternalSchemaUniqueItemsMatchExpression::debugString(StringBuilder& debug,
                                                           int indentationLevel) const {
    _debugAddSpace(debug, indentationLevel);

    BSONObjBuilder builder;
    serialize(&builder);
    debug << builder.obj().toString() << "\n";

    const auto* tag = getTag();
    if (tag) {
        debug << " ";
        tag->debugString(&debug);
    }
    debug << "\n";
}
Ejemplo n.º 6
0
void TypeMatchExpression::debugString(StringBuilder& debug, int level) const {
    _debugAddSpace(debug, level);
    debug << _path << " type: ";
    if (matchesAllNumbers()) {
        debug << kMatchesAllNumbersAlias;
    } else {
        debug << _type;
    }

    MatchExpression::TagData* td = getTag();
    if (NULL != td) {
        debug << " ";
        td->debugString(&debug);
    }
    debug << "\n";
}
Ejemplo n.º 7
0
void InMatchExpression::debugString(StringBuilder& debug, int level) const {
    _debugAddSpace(debug, level);
    debug << path() << " $in ";
    debug << "[ ";
    for (auto&& equality : _equalitySet) {
        debug << equality.toString(false) << " ";
    }
    for (auto&& regex : _regexes) {
        regex->shortDebugString(debug);
        debug << " ";
    }
    debug << "]";
    MatchExpression::TagData* td = getTag();
    if (NULL != td) {
        debug << " ";
        td->debugString(&debug);
    }
    debug << "\n";
}
Ejemplo n.º 8
0
    void ComparisonMatchExpression::debugString( StringBuilder& debug, int level ) const {
        _debugAddSpace( debug, level );
        debug << path() << " ";
        switch ( matchType() ) {
        case LT: debug << "$lt"; break;
        case LTE: debug << "$lte"; break;
        case EQ: debug << "=="; break;
        case GT: debug << "$gt"; break;
        case GTE: debug << "$gte"; break;
        default: debug << " UNKNOWN - should be impossible"; break;
        }
        debug << " " << _rhs.toString( false );

        MatchExpression::TagData* td = getTag();
        if (NULL != td) {
            debug << " ";
            td->debugString(&debug);
        }

        debug << "\n";
    }
Ejemplo n.º 9
0
void BitTestMatchExpression::debugString(StringBuilder& debug, int level) const {
    _debugAddSpace(debug, level);

    debug << path() << " ";

    switch (matchType()) {
        case BITS_ALL_SET:
            debug << "$bitsAllSet:";
            break;
        case BITS_ALL_CLEAR:
            debug << "$bitsAllClear:";
            break;
        case BITS_ANY_SET:
            debug << "$bitsAnySet:";
            break;
        case BITS_ANY_CLEAR:
            debug << "$bitsAnyClear:";
            break;
        default:
            invariant(false);
    }

    debug << " [";
    for (size_t i = 0; i < _bitPositions.size(); i++) {
        debug << _bitPositions[i];
        if (i != _bitPositions.size() - 1) {
            debug << ", ";
        }
    }
    debug << "]";

    MatchExpression::TagData* td = getTag();
    if (td) {
        debug << " ";
        td->debugString(&debug);
    }
}
Ejemplo n.º 10
0
void OrExpression::debugString( StringBuilder& debug, int level ) const {
    _debugAddSpace( debug, level );
    debug << "$or\n";
    _debugList( debug, level );
}
Ejemplo n.º 11
0
 void FalseMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << "$false\n";
 }
Ejemplo n.º 12
0
 void NinMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << path() << " $nin: TODO\n";
 }
Ejemplo n.º 13
0
 void AllMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << _path << " $all TODO\n";
 }
Ejemplo n.º 14
0
 void ExistsMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << _path << " exists: " << _exists << "\n";
 }
Ejemplo n.º 15
0
 void TypeMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << _path << " type: " << _type << "\n";
 }
Ejemplo n.º 16
0
 void ModMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << _path << " mod " << _divisor << " % x == "  << _remainder << "\n";
 }
void InternalSchemaObjectMatchExpression::debugString(StringBuilder& debug, int level) const {
    _debugAddSpace(debug, level);
    debug << kName << "\n";
    _sub->debugString(debug, level + 1);
}
Ejemplo n.º 18
0
 void NotMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << "$not\n";
     _exp->debugString( debug, level + 1 );
 }
Ejemplo n.º 19
0
 void ElemMatchObjectMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << path() << " $elemMatch\n";
     _sub->debugString( debug, level + 1 );
 }
Ejemplo n.º 20
0
 void AtomicMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << "$atomic\n";
 }
Ejemplo n.º 21
0
 void SizeMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << path() << " $size : " << _size << "\n";
 }
Ejemplo n.º 22
0
 void RegexMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << _path << " regex /" << _regex << "/" << _flags << "\n";
 }
Ejemplo n.º 23
0
 void AndMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << "$and\n";
     _debugList( debug, level );
 }
Ejemplo n.º 24
0
 void GeoMatchExpression::debugString( StringBuilder& debug, int level ) const {
     _debugAddSpace( debug, level );
     debug << "GEO\n";
 }