ClickHouse/src/Parsers/ASTAsterisk.cpp

28 lines
608 B
C++
Raw Normal View History

#include <Parsers/ASTAsterisk.h>
#include <IO/WriteBuffer.h>
2020-11-09 16:05:40 +00:00
#include <IO/Operators.h>
namespace DB
{
ASTPtr ASTAsterisk::clone() const
{
auto clone = std::make_shared<ASTAsterisk>(*this);
clone->cloneChildren();
return clone;
}
void ASTAsterisk::appendColumnName(WriteBuffer & ostr) const { ostr.write('*'); }
2020-08-29 05:33:46 +00:00
void ASTAsterisk::formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
{
settings.ostr << "*";
2020-08-29 05:33:46 +00:00
for (const auto & child : children)
{
settings.ostr << ' ';
child->formatImpl(settings, state, frame);
}
}
}