1 | #include <Parsers/ASTShowRowPoliciesQuery.h> |
---|---|
2 | #include <Common/quoteString.h> |
3 | |
4 | |
5 | namespace DB |
6 | { |
7 | void ASTShowRowPoliciesQuery::formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const |
8 | { |
9 | settings.ostr << (settings.hilite ? hilite_keyword : "") << "SHOW POLICIES"<< (settings.hilite ? hilite_none : ""); |
10 | |
11 | if (current) |
12 | settings.ostr << (settings.hilite ? hilite_keyword : "") << " CURRENT"<< (settings.hilite ? hilite_none : ""); |
13 | |
14 | if (!table_name.empty()) |
15 | { |
16 | settings.ostr << (settings.hilite ? hilite_keyword : "") << " ON "<< (settings.hilite ? hilite_none : ""); |
17 | if (!database.empty()) |
18 | settings.ostr << backQuoteIfNeed(database) << "."; |
19 | settings.ostr << backQuoteIfNeed(table_name); |
20 | } |
21 | } |
22 | } |
23 |