ClickHouse/src/Parsers/ASTDatabaseOrNone.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
452 B
C++
Raw Normal View History

2021-07-28 02:40:51 +00:00
#include <Parsers/ASTDatabaseOrNone.h>
#include <Common/quoteString.h>
2021-07-28 02:40:51 +00:00
#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 << backQuoteIfNeed(database_name);
2021-07-28 02:40:51 +00:00
}
}