ClickHouse/src/Parsers/ASTQualifiedAsterisk.cpp

28 lines
735 B
C++
Raw Normal View History

#include <Parsers/ASTQualifiedAsterisk.h>
#include <IO/WriteHelpers.h>
2020-11-09 16:05:40 +00:00
#include <IO/Operators.h>
namespace DB
{
void ASTQualifiedAsterisk::appendColumnName(WriteBuffer & ostr) const
{
const auto & qualifier = children.at(0);
qualifier->appendColumnName(ostr);
writeCString(".*", ostr);
}
void ASTQualifiedAsterisk::formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
{
const auto & qualifier = children.at(0);
qualifier->formatImpl(settings, state, frame);
settings.ostr << ".*";
2020-08-29 05:33:46 +00:00
for (ASTs::const_iterator it = children.begin() + 1; it != children.end(); ++it)
{
settings.ostr << ' ';
(*it)->formatImpl(settings, state, frame);
}
}
}