2013-09-03 20:21:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/IParserBase.h>
|
|
|
|
#include <Parsers/CommonParsers.h>
|
|
|
|
#include <Parsers/ExpressionElementParsers.h>
|
|
|
|
#include <Parsers/ASTShowProcesslistQuery.h>
|
2013-09-03 20:21:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-05-27 17:29:55 +00:00
|
|
|
/** Query SHOW PROCESSLIST
|
2013-09-03 20:21:28 +00:00
|
|
|
*/
|
2017-01-11 19:05:46 +00:00
|
|
|
class ParserShowProcesslistQuery : public IParserBase
|
2013-09-03 20:21:28 +00:00
|
|
|
{
|
|
|
|
protected:
|
2017-04-01 07:20:54 +00:00
|
|
|
const char * getName() const { return "SHOW PROCESSLIST query"; }
|
2013-09-03 20:21:28 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
auto query = std::make_shared<ASTShowProcesslistQuery>();
|
2013-09-03 20:21:28 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!ParserKeyword("SHOW PROCESSLIST").ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2013-09-03 20:21:28 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
node = query;
|
2013-09-03 20:21:28 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
return true;
|
|
|
|
}
|
2013-09-03 20:21:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|