| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <Parsers/IParserBase.h> |
| 4 | #include <Parsers/CommonParsers.h> |
| 5 | #include <Parsers/ASTQueryWithOutput.h> |
| 6 | |
| 7 | namespace DB |
| 8 | { |
| 9 | |
| 10 | /// Parse queries supporting [INTO OUTFILE 'file_name'] [FORMAT format_name] [SETTINGS key1 = value1, key2 = value2, ...] suffix. |
| 11 | class ParserQueryWithOutput : public IParserBase |
| 12 | { |
| 13 | public: |
| 14 | ParserQueryWithOutput(bool enable_explain_ = false) |
| 15 | : enable_explain(enable_explain_) |
| 16 | {} |
| 17 | |
| 18 | protected: |
| 19 | const char * getName() const override { return "Query with output"; } |
| 20 | |
| 21 | bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override; |
| 22 | |
| 23 | private: |
| 24 | bool enable_explain; |
| 25 | }; |
| 26 | |
| 27 | } |
| 28 |