ClickHouse/src/Parsers/ParserQueryWithOutput.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
789 B
C++
Raw Normal View History

2015-10-21 14:57:10 +00:00
#pragma once
#include <Parsers/IParserBase.h>
#include <Parsers/CommonParsers.h>
#include <Parsers/ASTQueryWithOutput.h>
2015-10-21 14:57:10 +00:00
namespace DB
{
/// 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
{
protected:
2020-12-16 10:00:21 +00:00
const char * end;
bool allow_settings_after_format_in_insert;
const char * getName() const override { return "Query with output"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2020-12-16 10:00:21 +00:00
public:
explicit ParserQueryWithOutput(const char * end_, bool allow_settings_after_format_in_insert_ = false)
: end(end_)
, allow_settings_after_format_in_insert(allow_settings_after_format_in_insert_)
{}
2015-10-21 14:57:10 +00:00
};
}