2011-10-30 11:30:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/IParserBase.h>
|
2011-10-30 11:30:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ParserQuery : public IParserBase
|
|
|
|
{
|
2017-07-10 03:41:02 +00:00
|
|
|
private:
|
|
|
|
const char * end;
|
2019-05-16 19:00:46 +00:00
|
|
|
bool enable_explain; /// Allow queries prefixed with AST and ANALYZE for development purposes.
|
2017-07-12 01:49:20 +00:00
|
|
|
|
|
|
|
const char * getName() const override { return "Query"; }
|
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
2018-10-09 14:32:11 +00:00
|
|
|
|
2017-07-12 01:49:20 +00:00
|
|
|
public:
|
2019-08-03 11:02:40 +00:00
|
|
|
ParserQuery(const char * end_, bool enable_explain_ = false)
|
|
|
|
: end(end_),
|
2018-10-09 14:32:11 +00:00
|
|
|
enable_explain(enable_explain_)
|
|
|
|
{}
|
2011-10-30 11:30:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|