2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/ASTQualifiedAsterisk.h>
|
2018-06-27 16:34:11 +00:00
|
|
|
#include <IO/WriteHelpers.h>
|
2020-11-09 16:05:40 +00:00
|
|
|
#include <IO/Operators.h>
|
2017-01-04 11:23:27 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-06-27 16:34:11 +00:00
|
|
|
void ASTQualifiedAsterisk::appendColumnName(WriteBuffer & ostr) const
|
2017-01-04 11:23:27 +00:00
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
const auto & qualifier = children.at(0);
|
2018-06-27 16:34:11 +00:00
|
|
|
qualifier->appendColumnName(ostr);
|
|
|
|
writeCString(".*", ostr);
|
2017-01-04 11:23:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ASTQualifiedAsterisk::formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
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);
|
|
|
|
}
|
2017-01-04 11:23:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|