2021-07-28 02:40:51 +00:00
|
|
|
#include <Parsers/ASTDatabaseOrNone.h>
|
2021-08-15 14:05:28 +00:00
|
|
|
#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;
|
|
|
|
}
|
2021-08-15 14:05:28 +00:00
|
|
|
settings.ostr << backQuoteIfNeed(database_name);
|
2021-07-28 02:40:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|