aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Parsers/Kusto/ParserKQLQuery.h
blob: 42f5f84f0317c4f3deb3736d101eb2b3cca0714c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <Parsers/IParserBase.h>
#include <Parsers/ASTSelectQuery.h>

namespace DB
{
class ParserKQLBase : public IParserBase
{
public:
    static String getExprFromToken(Pos & pos);
    static String getExprFromPipe(Pos & pos);
    static String getExprFromToken(const String & text, const uint32_t & max_depth);
};

class ParserKQLQuery : public IParserBase
{

protected:
    static std::unique_ptr<IParserBase> getOperator(String &op_name);
    const char * getName() const override { return "KQL query"; }
    bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
};

class ParserKQLSubquery : public IParserBase
{
protected:
    const char * getName() const override { return "KQL subquery"; }
    bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
};

}