Package com.mckoi.database
Interface QueryPlanNode
- All Superinterfaces:
Cloneable
,Serializable
- All Known Implementing Classes:
QueryPlan.BranchQueryPlanNode
,QueryPlan.CachePointNode
,QueryPlan.CompositeNode
,QueryPlan.ConstantSelectNode
,QueryPlan.CreateFunctionsNode
,QueryPlan.DistinctNode
,QueryPlan.EquiJoinNode
,QueryPlan.ExhaustiveSelectNode
,QueryPlan.FetchTableNode
,QueryPlan.FetchViewNode
,QueryPlan.FunctionalSelectNode
,QueryPlan.GroupNode
,QueryPlan.JoinNode
,QueryPlan.LeftOuterJoinNode
,QueryPlan.LogicalUnionNode
,QueryPlan.MarkerNode
,QueryPlan.MultiColumnEquiSelectNode
,QueryPlan.NaturalJoinNode
,QueryPlan.NonCorrelatedAnyAllNode
,QueryPlan.RangeSelectNode
,QueryPlan.SimplePatternSelectNode
,QueryPlan.SimpleSelectNode
,QueryPlan.SingleQueryPlanNode
,QueryPlan.SingleRowTableNode
,QueryPlan.SortNode
,QueryPlan.SubsetNode
A node element of a query plan tree. A plan of a query is represented as
a tree structure of such nodes. The design allows for plan nodes to be
easily reorganised for the construction of better plans.
- Author:
- Tobias Downer
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Deep clones this query plan.void
debugString
(int indent, StringBuffer buf) Writes a textural representation of the node to the StringBuffer at the given indent level.discoverCorrelatedVariables
(int level, ArrayList list) Discovers all the correlated variables in the plan (and plan children) that reference a particular layer.discoverTableNames
(ArrayList list) Discovers a list of TableName that represent the sources that this query requires to complete itself.evaluate
(QueryContext context) Evaluates the node and returns the result as a Table.
-
Method Details
-
evaluate
Evaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables -
discoverTableNames
Discovers a list of TableName that represent the sources that this query requires to complete itself. For example, if this is a query plan of two joined table, the fully resolved names of both tables are returned.The resultant list will not contain the same table name more than once. The resultant list contains TableName objects.
NOTE, if a table is aliased, the unaliased name is returned.
-
clone
Deep clones this query plan.- Throws:
CloneNotSupportedException
-
debugString
Writes a textural representation of the node to the StringBuffer at the given indent level.
-