mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
29 lines
719 B
C++
29 lines
719 B
C++
#include <Parsers/ASTShowGrantsQuery.h>
|
|
#include <Common/quoteString.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
String ASTShowGrantsQuery::getID(char) const
|
|
{
|
|
return "ShowGrantsQuery";
|
|
}
|
|
|
|
|
|
ASTPtr ASTShowGrantsQuery::clone() const
|
|
{
|
|
return std::make_shared<ASTShowGrantsQuery>(*this);
|
|
}
|
|
|
|
|
|
void ASTShowGrantsQuery::formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const
|
|
{
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << "SHOW GRANTS"
|
|
<< (settings.hilite ? hilite_none : "");
|
|
|
|
if (!current_user)
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << " FOR " << (settings.hilite ? hilite_none : "")
|
|
<< backQuoteIfNeed(name);
|
|
}
|
|
}
|