18 using System.Collections.Generic;
24 tableNames =
new List<ObjectName>();
36 return base.VisitFetchTable(node);
40 if (!tableNames.Contains(node.
ViewName))
43 return base.VisitFetchView(node);
50 return base.VisitJoin(node);
55 node.
Expression.DiscoverTableNames(tableNames);
57 return base.VisitConstantSelect(node);
62 node.
Expression.DiscoverTableNames(tableNames);
64 return base.VisitRangeSelect(node);
69 node.
Expression.DiscoverTableNames(tableNames);
71 return base.VisitSimpleSelect(node);
76 foreach (var
function in node.
Functions) {
77 function.DiscoverTableNames(tableNames);
81 return base.VisitGroup(node);
86 node.
Expression.DiscoverTableNames(tableNames);
88 return base.VisitExhaustiveSelect(node);
93 node.
Expression.DiscoverTableNames(tableNames);
95 return base.VisitSimplePatternSelect(node);
readonly IList< ObjectName > tableNames
The node for evaluating an expression that contains entirely constant values (no variables).
SqlExpression[] Functions
A query to the database to select data from a set of tables and columns.
SqlExpression Expression
A simple expression that represents the range to select. See the class comments for a description for...
override IQueryPlanNode VisitFetchView(FetchViewNode node)
override IQueryPlanNode VisitGroup(GroupNode node)
The node for performing a simple indexed query on a single column of the child node.
A node element of a query plan tree. /summary>
The node for performing a simple select operation on a table.
override IQueryPlanNode VisitRangeSelect(RangeSelectNode node)
override IQueryPlanNode VisitJoin(JoinNode node)
override IQueryPlanNode VisitExhaustiveSelect(ExhaustiveSelectNode node)
SqlExpression RightExpression
The node for performing a exhaustive select operation on the child node.
SqlExpression Expression
The search expression.
override IQueryPlanNode VisitSimpleSelect(SimpleSelectNode node)
ObjectName TableName
The name of the table to fetch.
override IQueryPlanNode VisitSimplePatternSelect(SimplePatternSelectNode node)
override IQueryPlanNode VisitConstantSelect(ConstantSelectNode node)
override IQueryPlanNode VisitFetchTable(FetchTableNode node)
IList< ObjectName > Discover(IQueryPlanNode queryPlan)
QueryNodeTableNameVisitor()
The node for fetching a table from the current transaction.