ClickHouse/src/Parsers/ASTQueryWithTableAndOutput.cpp

17 lines
475 B
C++
Raw Normal View History

#include <Parsers/ASTQueryWithTableAndOutput.h>
#include <Common/quoteString.h>
2020-11-09 16:05:40 +00:00
#include <IO/Operators.h>
namespace DB
{
void ASTQueryWithTableAndOutput::formatHelper(const FormatSettings & settings, const char * name) const
{
settings.ostr << (settings.hilite ? hilite_keyword : "") << name << " " << (settings.hilite ? hilite_none : "");
settings.ostr << (!getDatabase().empty() ? backQuoteIfNeed(getDatabase()) + "." : "") << backQuoteIfNeed(getTable());
}
}