mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
23 lines
785 B
C++
23 lines
785 B
C++
#include <Parsers/ASTShowRowPoliciesQuery.h>
|
|
#include <Common/quoteString.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
void ASTShowRowPoliciesQuery::formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const
|
|
{
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << "SHOW POLICIES" << (settings.hilite ? hilite_none : "");
|
|
|
|
if (current)
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << " CURRENT" << (settings.hilite ? hilite_none : "");
|
|
|
|
if (!table_name.empty())
|
|
{
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << " ON " << (settings.hilite ? hilite_none : "");
|
|
if (!database.empty())
|
|
settings.ostr << backQuoteIfNeed(database) << ".";
|
|
settings.ostr << backQuoteIfNeed(table_name);
|
|
}
|
|
}
|
|
}
|