ClickHouse/src/Parsers/ASTDatabaseOrNone.cpp
2021-08-15 17:05:28 +03:00

18 lines
452 B
C++

#include <Parsers/ASTDatabaseOrNone.h>
#include <Common/quoteString.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 << backQuoteIfNeed(database_name);
}
}