ClickHouse/src/Parsers/ASTShowSettingQuery.cpp
2023-10-25 18:49:00 +03:00

26 lines
650 B
C++

#include <Parsers/ASTShowSettingQuery.h>
#include <iomanip>
#include <IO/Operators.h>
#include <Common/quoteString.h>
namespace DB
{
ASTPtr ASTShowSettingQuery::clone() const
{
auto res = std::make_shared<ASTShowSettingQuery>(*this);
res->children.clear();
cloneOutputOptions(*res);
res->setting_name = setting_name;
return res;
}
void ASTShowSettingQuery::formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const
{
settings.ostr << (settings.hilite ? hilite_keyword : "") << "SHOW SETTING " << (settings.hilite ? hilite_none : "")
<< backQuoteIfNeed(setting_name);
}
}