ClickHouse/src/Parsers/ASTDatabaseOrNone.cpp

17 lines
403 B
C++
Raw Normal View History

2021-07-28 02:40:51 +00:00
#include <Parsers/ASTDatabaseOrNone.h>
#include <IO/Operators.h>
2021-07-27 12:32:04 +00:00
2021-07-28 02:40:51 +00:00
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;
}
}