Package com.mckoi.database
Class QueryPlan.FetchViewNode
java.lang.Object
com.mckoi.database.QueryPlan.FetchViewNode
- All Implemented Interfaces:
QueryPlanNode
,Serializable
,Cloneable
- Enclosing class:
- QueryPlan
The node that fetches a view from the current connection. This is a
tree node that has no children, however the child can be created by
calling the 'createViewChildNode' method. This node can be removed from a
plan tree by calling the 'createViewChildNode' method and substituting this
node with the returned child. For a planner that normalizes and optimizes
plan trees, this is a useful feature.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deep clones this query plan.createViewChildNode
(QueryContext context) Returns the QueryPlanNode that resolves to the view.void
debugString
(int level, 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) Adds the table name to the list if it's not already in there.evaluate
(QueryContext context) Evaluates the node and returns the result as a Table.
-
Constructor Details
-
FetchViewNode
-
-
Method Details
-
createViewChildNode
Returns the QueryPlanNode that resolves to the view. This looks up the query plan in the context given. -
discoverTableNames
Adds the table name to the list if it's not already in there.- Specified by:
discoverTableNames
in interfaceQueryPlanNode
-
evaluate
Description copied from interface:QueryPlanNode
Evaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables- Specified by:
evaluate
in interfaceQueryPlanNode
-
clone
Description copied from interface:QueryPlanNode
Deep clones this query plan.- Specified by:
clone
in interfaceQueryPlanNode
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
titleString
-
debugString
Description copied from interface:QueryPlanNode
Writes a textural representation of the node to the StringBuffer at the given indent level.- Specified by:
debugString
in interfaceQueryPlanNode
-