2015-10-21 14:57:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/IParserBase.h>
|
|
|
|
#include <Parsers/CommonParsers.h>
|
|
|
|
#include <Parsers/ASTQueryWithOutput.h>
|
2015-10-21 14:57:10 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2019-01-23 19:23:37 +00:00
|
|
|
/// Parse queries supporting [INTO OUTFILE 'file_name'] [FORMAT format_name] [SETTINGS key1 = value1, key2 = value2, ...] suffix.
|
2015-10-21 14:57:10 +00:00
|
|
|
class ParserQueryWithOutput : public IParserBase
|
|
|
|
{
|
2018-10-09 14:32:11 +00:00
|
|
|
public:
|
|
|
|
ParserQueryWithOutput(bool enable_explain_ = false)
|
|
|
|
: enable_explain(enable_explain_)
|
|
|
|
{}
|
|
|
|
|
2015-10-21 14:57:10 +00:00
|
|
|
protected:
|
2017-04-01 07:20:54 +00:00
|
|
|
const char * getName() const override { return "Query with output"; }
|
2017-01-11 19:05:46 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
2018-10-09 14:32:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool enable_explain;
|
2015-10-21 14:57:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|