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); } }
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"; }
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); } }
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"; }
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"; }
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"; }
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"; }
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); } }
void OrExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << "$or\n"; _debugList( debug, level ); }
void FalseMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << "$false\n"; }
void NinMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << path() << " $nin: TODO\n"; }
void AllMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << _path << " $all TODO\n"; }
void ExistsMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << _path << " exists: " << _exists << "\n"; }
void TypeMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << _path << " type: " << _type << "\n"; }
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); }
void NotMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << "$not\n"; _exp->debugString( debug, level + 1 ); }
void ElemMatchObjectMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << path() << " $elemMatch\n"; _sub->debugString( debug, level + 1 ); }
void AtomicMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << "$atomic\n"; }
void SizeMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << path() << " $size : " << _size << "\n"; }
void RegexMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << _path << " regex /" << _regex << "/" << _flags << "\n"; }
void AndMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << "$and\n"; _debugList( debug, level ); }
void GeoMatchExpression::debugString( StringBuilder& debug, int level ) const { _debugAddSpace( debug, level ); debug << "GEO\n"; }