2016-07-18 00:14:24 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#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:
|
2020-01-21 08:54:26 +00:00
|
|
|
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:
|
2020-01-21 08:54:26 +00:00
|
|
|
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:
|
2017-04-01 07:20:54 +00:00
|
|
|
bool is_first;
|
2016-07-18 00:14:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ParserTableExpression : public IParserBase
|
|
|
|
{
|
|
|
|
protected:
|
2020-01-21 08:54:26 +00:00
|
|
|
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:
|
2020-01-21 08:54:26 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|