ClickHouse/dbms/src/Parsers/ParserTablesInSelectQuery.h

50 lines
1.2 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
{
/** 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 { return "table, table function, subquery or list of joined tables"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
2016-07-18 00:14:24 +00:00
};
class ParserTablesInSelectQueryElement : public IParserBase
{
public:
ParserTablesInSelectQueryElement(bool is_first) : is_first(is_first) {}
2016-07-18 00:14:24 +00:00
protected:
const char * getName() const { return "table, table function, subquery or list of joined tables"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
2016-07-18 00:14:24 +00:00
private:
bool is_first;
2016-07-18 00:14:24 +00:00
};
class ParserTableExpression : public IParserBase
{
protected:
const char * getName() const { return "table or subquery or table function"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
2016-07-18 00:14:24 +00:00
};
class ParserArrayJoin : public IParserBase
{
protected:
const char * getName() const { return "array join"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
2016-07-18 00:14:24 +00:00
};
}