1 | #pragma once |
---|---|
2 | |
3 | #include <Parsers/IAST.h> |
4 | #include <Interpreters/Aliases.h> |
5 | #include <Interpreters/InDepthNodeVisitor.h> |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | class ASTFunction; |
11 | struct ASTTableExpression; |
12 | |
13 | class MarkTableIdentifiersMatcher |
14 | { |
15 | public: |
16 | using Visitor = InDepthNodeVisitor<MarkTableIdentifiersMatcher, true>; |
17 | |
18 | struct Data |
19 | { |
20 | const Aliases & aliases; |
21 | }; |
22 | |
23 | static bool needChildVisit(ASTPtr & node, const ASTPtr & child); |
24 | static void visit(ASTPtr & ast, Data & data); |
25 | |
26 | private: |
27 | static void visit(ASTTableExpression & table, ASTPtr &, Data &); |
28 | static void visit(const ASTFunction & func, ASTPtr &, Data &); |
29 | }; |
30 | |
31 | using MarkTableIdentifiersVisitor = MarkTableIdentifiersMatcher::Visitor; |
32 | |
33 | } |
34 |