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:
|
2017-04-01 07:20:54 +00:00
|
|
|
const char * getName() const { return "table, table function, subquery or list of joined tables"; }
|
2017-07-10 03:28:12 +00:00
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
|
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:
|
2017-04-01 07:20:54 +00:00
|
|
|
const char * getName() const { return "table, table function, subquery or list of joined tables"; }
|
2017-07-10 03:28:12 +00:00
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
|
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:
|
2017-04-01 07:20:54 +00:00
|
|
|
const char * getName() const { return "table or subquery or table function"; }
|
2017-07-10 03:28:12 +00:00
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
|
2016-07-18 00:14:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ParserArrayJoin : public IParserBase
|
|
|
|
{
|
|
|
|
protected:
|
2017-04-01 07:20:54 +00:00
|
|
|
const char * getName() const { return "array join"; }
|
2017-07-10 03:28:12 +00:00
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected);
|
2016-07-18 00:14:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|