ClickHouse/src/Parsers/ParserTablesInSelectQuery.h

54 lines
1.3 KiB
C++
Raw Normal View History

2016-07-18 00:14:24 +00:00
#pragma once
#include <Parsers/IParserBase.h>
2016-07-18 00:14:24 +00:00
namespace DB
{
struct ASTTableJoin;
2016-07-18 00:14:24 +00:00
/** List of single or multiple JOIN-ed tables or subqueries in SELECT query, with ARRAY JOINs and SAMPLE, FINAL modifiers.
*/
class ParserTablesInSelectQuery : public IParserBase
{
protected:
const char * getName() const override { return "table, table function, subquery or list of joined tables"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2016-07-18 00:14:24 +00:00
};
class ParserTablesInSelectQueryElement : public IParserBase
{
public:
2019-08-03 11:02:40 +00:00
ParserTablesInSelectQueryElement(bool is_first_) : is_first(is_first_) {}
2016-07-18 00:14:24 +00:00
protected:
const char * getName() const override { return "table, table function, subquery or list of joined tables"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2016-07-18 00:14:24 +00:00
private:
bool is_first;
static void parseJoinStrictness(Pos & pos, ASTTableJoin & table_join);
2016-07-18 00:14:24 +00:00
};
class ParserTableExpression : public IParserBase
{
protected:
const char * getName() const override { return "table or subquery or table function"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2016-07-18 00:14:24 +00:00
};
class ParserArrayJoin : public IParserBase
{
protected:
const char * getName() const override { return "array join"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2016-07-18 00:14:24 +00:00
};
}