mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
33d99c8ffb
Add allow_settings_after_format_in_insert setting, OFF by default. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> v2: s/parser_settings_after_format_compact/allow_settings_after_format_in_insert/ (suggested by vitlibar) v3: replace ParserSettings with a flag (requested by vitlibar)
28 lines
789 B
C++
28 lines
789 B
C++
#pragma once
|
|
|
|
#include <Parsers/IParserBase.h>
|
|
#include <Parsers/CommonParsers.h>
|
|
#include <Parsers/ASTQueryWithOutput.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Parse queries supporting [INTO OUTFILE 'file_name'] [FORMAT format_name] [SETTINGS key1 = value1, key2 = value2, ...] suffix.
|
|
class ParserQueryWithOutput : public IParserBase
|
|
{
|
|
protected:
|
|
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;
|
|
|
|
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_)
|
|
{}
|
|
};
|
|
|
|
}
|