DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Private Member Functions | List of all members
Deveel.Data.Sql.Query.QueryPlanNodeVisitor Class Reference
Inheritance diagram for Deveel.Data.Sql.Query.QueryPlanNodeVisitor:
Deveel.Data.Sql.Query.IQueryPlanNodeVisitor Deveel.Data.Sql.Query.QueryNodeTableNameVisitor

Protected Member Functions

virtual IQueryPlanNode VisitNode (IQueryPlanNode node)
 
virtual IQueryPlanNode VisitSingleRowTable (SingleRowTableNode node)
 
virtual IQueryPlanNode VisitFetchView (FetchViewNode node)
 
virtual IQueryPlanNode VisitFetchTable (FetchTableNode node)
 
virtual IQueryPlanNode VisitSingle (SingleQueryPlanNode node)
 
virtual IQueryPlanNode VisitLimit (LimitNode node)
 
virtual IQueryPlanNode VisitCreateFunctions (CreateFunctionsNode node)
 
virtual IQueryPlanNode VisitBranch (BranchQueryPlanNode node)
 
virtual IQueryPlanNode VisitNonCorrelatedAnyAll (NonCorrelatedAnyAllNode node)
 
virtual IQueryPlanNode VisitLogicalUnion (LogicalUnionNode node)
 
virtual IQueryPlanNode VisitJoin (JoinNode node)
 
virtual IQueryPlanNode VisitNaturalJoin (NaturalJoinNode node)
 
virtual IQueryPlanNode VisitEquiJoin (EquiJoinNode node)
 
virtual IQueryPlanNode VisitComposite (CompositeNode node)
 
virtual IQueryPlanNode VisitMarker (MarkerNode node)
 
virtual IQueryPlanNode VisitLeftOuterJoin (LeftOuterJoinNode node)
 
virtual IQueryPlanNode VisitGroup (GroupNode node)
 
virtual IQueryPlanNode VisitSimplePatternSelect (SimplePatternSelectNode node)
 
virtual IQueryPlanNode VisitRangeSelect (RangeSelectNode node)
 
virtual IQueryPlanNode VisitCachePoint (CachePointNode node)
 
virtual IQueryPlanNode VisitSort (SortNode node)
 
virtual IQueryPlanNode VisitDistinct (DistinctNode node)
 
virtual IQueryPlanNode VisitConstantSelect (ConstantSelectNode node)
 
virtual IQueryPlanNode VisitExhaustiveSelect (ExhaustiveSelectNode node)
 
virtual IQueryPlanNode VisitSimpleSelect (SimpleSelectNode node)
 
virtual IQueryPlanNode VisitSubset (SubsetNode node)
 

Private Member Functions

IQueryPlanNode IQueryPlanNodeVisitor. Visit (IQueryPlanNode node)
 

Additional Inherited Members

Detailed Description

Definition at line 20 of file QueryPlanNodeVisitor.cs.

Member Function Documentation

IQueryPlanNode IQueryPlanNodeVisitor. Deveel.Data.Sql.Query.QueryPlanNodeVisitor.Visit ( IQueryPlanNode  node)
inlineprivate

Implements Deveel.Data.Sql.Query.IQueryPlanNodeVisitor.

Definition at line 21 of file QueryPlanNodeVisitor.cs.

21  {
22  return VisitNode(node);
23  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitBranch ( BranchQueryPlanNode  node)
inlineprotectedvirtual

Definition at line 101 of file QueryPlanNodeVisitor.cs.

101  {
102  if (node is CompositeNode)
103  return VisitComposite((CompositeNode) node);
104  if (node is JoinNode)
105  return VisitJoin((JoinNode) node);
106  if (node is EquiJoinNode)
107  return VisitEquiJoin((EquiJoinNode) node);
108  if (node is NaturalJoinNode)
109  return VisitNaturalJoin((NaturalJoinNode) node);
110  if (node is LogicalUnionNode)
111  return VisitLogicalUnion((LogicalUnionNode) node);
112  if (node is NonCorrelatedAnyAllNode)
113  return VisitNonCorrelatedAnyAll((NonCorrelatedAnyAllNode) node);
114 
115  throw new NotSupportedException();
116  }
virtual IQueryPlanNode VisitJoin(JoinNode node)
virtual IQueryPlanNode VisitNaturalJoin(NaturalJoinNode node)
virtual IQueryPlanNode VisitEquiJoin(EquiJoinNode node)
virtual IQueryPlanNode VisitLogicalUnion(LogicalUnionNode node)
virtual IQueryPlanNode VisitComposite(CompositeNode node)
virtual IQueryPlanNode VisitNonCorrelatedAnyAll(NonCorrelatedAnyAllNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitCachePoint ( CachePointNode  node)
inlineprotectedvirtual

Definition at line 224 of file QueryPlanNodeVisitor.cs.

224  {
225  var child = node.Child;
226  if (child != null)
227  child = VisitNode(child);
228 
229  return new CachePointNode(child);
230  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitComposite ( CompositeNode  node)
inlineprotectedvirtual

Definition at line 173 of file QueryPlanNodeVisitor.cs.

173  {
174  var left = node.Left;
175  var right = node.Right;
176  if (left != null)
177  left = VisitNode(left);
178  if (right != null)
179  right = VisitNode(right);
180 
181  return new CompositeNode(left, right, node.CompositeFunction, node.All);
182  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitConstantSelect ( ConstantSelectNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 248 of file QueryPlanNodeVisitor.cs.

248  {
249  var child = node.Child;
250  if (child != null)
251  child = VisitNode(child);
252 
253  return new ConstantSelectNode(child, node.Expression);
254  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitCreateFunctions ( CreateFunctionsNode  node)
inlineprotectedvirtual

Definition at line 93 of file QueryPlanNodeVisitor.cs.

93  {
94  var child = node.Child;
95  if (child != null)
96  child = VisitNode(child);
97 
98  return new CreateFunctionsNode(child, node.Functions, node.Names);
99  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitDistinct ( DistinctNode  node)
inlineprotectedvirtual

Definition at line 240 of file QueryPlanNodeVisitor.cs.

240  {
241  var child = node.Child;
242  if (child != null)
243  child = VisitNode(child);
244 
245  return new DistinctNode(child, node.ColumnNames);
246  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitEquiJoin ( EquiJoinNode  node)
inlineprotectedvirtual

Definition at line 162 of file QueryPlanNodeVisitor.cs.

162  {
163  var left = node.Left;
164  var right = node.Right;
165  if (left != null)
166  left = VisitNode(left);
167  if (right != null)
168  right = VisitNode(right);
169 
170  return new EquiJoinNode(left, right, node.LeftColumns, node.RightColumns);
171  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitExhaustiveSelect ( ExhaustiveSelectNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 256 of file QueryPlanNodeVisitor.cs.

256  {
257  var child = node.Child;
258  if (child != null)
259  child = VisitNode(child);
260 
261  return new ExhaustiveSelectNode(child, node.Expression);
262  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitFetchTable ( FetchTableNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 48 of file QueryPlanNodeVisitor.cs.

48  {
49  return new FetchTableNode(node.TableName, node.AliasName);
50  }
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitFetchView ( FetchViewNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 44 of file QueryPlanNodeVisitor.cs.

44  {
45  return new FetchViewNode(node.ViewName, node.AliasName);
46  }
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitGroup ( GroupNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 200 of file QueryPlanNodeVisitor.cs.

200  {
201  var child = node.Child;
202  if (child != null)
203  child = VisitNode(child);
204 
205  return new GroupNode(child, node.ColumnNames, node.GroupMaxColumn, node.Functions, node.Names);
206  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitJoin ( JoinNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 140 of file QueryPlanNodeVisitor.cs.

140  {
141  var left = node.Left;
142  var right = node.Right;
143  if (left != null)
144  left = VisitNode(left);
145  if (right != null)
146  right = VisitNode(right);
147 
148  return new JoinNode(left, right, node.LeftColumnName, node.Operator, node.RightExpression);
149  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitLeftOuterJoin ( LeftOuterJoinNode  node)
inlineprotectedvirtual

Definition at line 192 of file QueryPlanNodeVisitor.cs.

192  {
193  var child = node.Child;
194  if (child != null)
195  child = VisitNode(child);
196 
197  return new LeftOuterJoinNode(child, node.MarkerName);
198  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitLimit ( LimitNode  node)
inlineprotectedvirtual

Definition at line 85 of file QueryPlanNodeVisitor.cs.

85  {
86  var child = node.Child;
87  if (child != null)
88  child = VisitNode(child);
89 
90  return new LimitNode(child, node.Offset, node.Count);
91  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitLogicalUnion ( LogicalUnionNode  node)
inlineprotectedvirtual

Definition at line 129 of file QueryPlanNodeVisitor.cs.

129  {
130  var left = node.Left;
131  var right = node.Right;
132  if (left != null)
133  left = VisitNode(left);
134  if (right != null)
135  right = VisitNode(right);
136 
137  return new LogicalUnionNode(left, right);
138  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitMarker ( MarkerNode  node)
inlineprotectedvirtual

Definition at line 184 of file QueryPlanNodeVisitor.cs.

184  {
185  var child = node.Child;
186  if (child != null)
187  child = VisitNode(child);
188 
189  return new MarkerNode(child, node.MarkName);
190  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitNaturalJoin ( NaturalJoinNode  node)
inlineprotectedvirtual

Definition at line 151 of file QueryPlanNodeVisitor.cs.

151  {
152  var left = node.Left;
153  var right = node.Right;
154  if (left != null)
155  left = VisitNode(left);
156  if (right != null)
157  right = VisitNode(right);
158 
159  return new NaturalJoinNode(left, right);
160  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitNode ( IQueryPlanNode  node)
inlineprotectedvirtual

Definition at line 25 of file QueryPlanNodeVisitor.cs.

25  {
26  if (node is SingleQueryPlanNode)
27  return VisitSingle((SingleQueryPlanNode) node);
28  if (node is BranchQueryPlanNode)
29  return VisitBranch((BranchQueryPlanNode) node);
30  if (node is FetchTableNode)
31  return VisitFetchTable((FetchTableNode) node);
32  if (node is FetchViewNode)
33  return VisitFetchView((FetchViewNode) node);
34  if (node is SingleRowTableNode)
35  return VisitSingleRowTable((SingleRowTableNode) node);
36 
37  throw new NotSupportedException();
38  }
virtual IQueryPlanNode VisitSingleRowTable(SingleRowTableNode node)
virtual IQueryPlanNode VisitBranch(BranchQueryPlanNode node)
virtual IQueryPlanNode VisitFetchTable(FetchTableNode node)
virtual IQueryPlanNode VisitSingle(SingleQueryPlanNode node)
virtual IQueryPlanNode VisitFetchView(FetchViewNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitNonCorrelatedAnyAll ( NonCorrelatedAnyAllNode  node)
inlineprotectedvirtual

Definition at line 118 of file QueryPlanNodeVisitor.cs.

118  {
119  var left = node.Left;
120  var right = node.Right;
121  if (left != null)
122  left = VisitNode(left);
123  if (right != null)
124  right = VisitNode(right);
125 
126  return new NonCorrelatedAnyAllNode(left, right, node.LeftColumnNames, node.SubQueryType);
127  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitRangeSelect ( RangeSelectNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 216 of file QueryPlanNodeVisitor.cs.

216  {
217  var child = node.Child;
218  if (child != null)
219  child = VisitNode(child);
220 
221  return new RangeSelectNode(child, node.Expression);
222  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitSimplePatternSelect ( SimplePatternSelectNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 208 of file QueryPlanNodeVisitor.cs.

208  {
209  var child = node.Child;
210  if (child != null)
211  child = VisitNode(child);
212 
213  return new SimplePatternSelectNode(child, node.Expression);
214  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitSimpleSelect ( SimpleSelectNode  node)
inlineprotectedvirtual

Reimplemented in Deveel.Data.Sql.Query.QueryNodeTableNameVisitor.

Definition at line 264 of file QueryPlanNodeVisitor.cs.

264  {
265  var child = node.Child;
266  if (child != null)
267  child = VisitNode(child);
268 
269  return new SimpleSelectNode(child, node.ColumnName, node.OperatorType, node.Expression);
270  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitSingle ( SingleQueryPlanNode  node)
inlineprotectedvirtual

Definition at line 52 of file QueryPlanNodeVisitor.cs.

52  {
53  if (node is SimpleSelectNode)
54  return VisitSimpleSelect((SimpleSelectNode) node);
55  if (node is SimplePatternSelectNode)
56  return VisitSimplePatternSelect((SimplePatternSelectNode) node);
57  if (node is ExhaustiveSelectNode)
58  return VisitExhaustiveSelect((ExhaustiveSelectNode) node);
59  if (node is ConstantSelectNode)
60  return VisitConstantSelect((ConstantSelectNode) node);
61  if (node is RangeSelectNode)
62  return VisitRangeSelect((RangeSelectNode) node);
63  if (node is DistinctNode)
64  return VisitDistinct((DistinctNode) node);
65  if (node is LeftOuterJoinNode)
66  return VisitLeftOuterJoin((LeftOuterJoinNode) node);
67  if (node is CachePointNode)
68  return VisitCachePoint((CachePointNode) node);
69  if (node is MarkerNode)
70  return VisitMarker((MarkerNode) node);
71  if (node is SubsetNode)
72  return VisitSubset((SubsetNode) node);
73  if (node is GroupNode)
74  return VisitGroup((GroupNode) node);
75  if (node is SortNode)
76  return VisitSort((SortNode) node);
77  if (node is CreateFunctionsNode)
78  return VisitCreateFunctions((CreateFunctionsNode) node);
79  if (node is LimitNode)
80  return VisitLimit((LimitNode) node);
81 
82  throw new NotSupportedException();
83  }
virtual IQueryPlanNode VisitSort(SortNode node)
virtual IQueryPlanNode VisitLeftOuterJoin(LeftOuterJoinNode node)
virtual IQueryPlanNode VisitSimplePatternSelect(SimplePatternSelectNode node)
virtual IQueryPlanNode VisitConstantSelect(ConstantSelectNode node)
virtual IQueryPlanNode VisitCreateFunctions(CreateFunctionsNode node)
virtual IQueryPlanNode VisitRangeSelect(RangeSelectNode node)
virtual IQueryPlanNode VisitLimit(LimitNode node)
virtual IQueryPlanNode VisitSimpleSelect(SimpleSelectNode node)
virtual IQueryPlanNode VisitSubset(SubsetNode node)
virtual IQueryPlanNode VisitGroup(GroupNode node)
virtual IQueryPlanNode VisitCachePoint(CachePointNode node)
virtual IQueryPlanNode VisitMarker(MarkerNode node)
virtual IQueryPlanNode VisitExhaustiveSelect(ExhaustiveSelectNode node)
virtual IQueryPlanNode VisitDistinct(DistinctNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitSingleRowTable ( SingleRowTableNode  node)
inlineprotectedvirtual

Definition at line 40 of file QueryPlanNodeVisitor.cs.

40  {
41  return new SingleRowTableNode();
42  }
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitSort ( SortNode  node)
inlineprotectedvirtual

Definition at line 232 of file QueryPlanNodeVisitor.cs.

232  {
233  var child = node.Child;
234  if (child != null)
235  child = VisitNode(child);
236 
237  return new SortNode(child, node.ColumnNames, node.Ascending);
238  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)
virtual IQueryPlanNode Deveel.Data.Sql.Query.QueryPlanNodeVisitor.VisitSubset ( SubsetNode  node)
inlineprotectedvirtual

Definition at line 272 of file QueryPlanNodeVisitor.cs.

272  {
273  var child = node.Child;
274  if (child != null)
275  child = VisitNode(child);
276 
277  return new SubsetNode(child, node.OriginalColumnNames, node.AliasColumnNames);
278  }
virtual IQueryPlanNode VisitNode(IQueryPlanNode node)

The documentation for this class was generated from the following file: