ClickHouse/src/Parsers/ASTDatabaseOrNone.cpp
2021-07-28 14:05:22 +08:00

17 lines
403 B
C++

#include <Parsers/ASTDatabaseOrNone.h>
#include <IO/Operators.h>
namespace DB
{
void ASTDatabaseOrNone::formatImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const
{
if (none)
{
settings.ostr << (settings.hilite ? IAST::hilite_keyword : "") << "NONE" << (settings.hilite ? IAST::hilite_none : "");
return;
}
settings.ostr << database_name;
}
}