Package com.mckoi.database
Class QueryPlan.SingleRowTableNode
- java.lang.Object
-
- com.mckoi.database.QueryPlan.SingleRowTableNode
-
- All Implemented Interfaces:
QueryPlanNode,java.io.Serializable,java.lang.Cloneable
- Enclosing class:
- QueryPlan
public static class QueryPlan.SingleRowTableNode extends java.lang.Object implements QueryPlanNode
A node for creating a table with a single row. This table is useful for queries that have no underlying row. For example, a pure functional table expression.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SingleRowTableNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Deep clones this query plan.voiddebugString(int level, java.lang.StringBuffer buf)Writes a textural representation of the node to the StringBuffer at the given indent level.java.util.ArrayListdiscoverCorrelatedVariables(int level, java.util.ArrayList list)Discovers all the correlated variables in the plan (and plan children) that reference a particular layer.java.util.ArrayListdiscoverTableNames(java.util.ArrayList list)Discovers a list of TableName that represent the sources that this query requires to complete itself.Tableevaluate(QueryContext context)Evaluates the node and returns the result as a Table.java.lang.StringtitleString()
-
-
-
Method Detail
-
discoverTableNames
public java.util.ArrayList discoverTableNames(java.util.ArrayList list)
Description copied from interface:QueryPlanNodeDiscovers 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.
- Specified by:
discoverTableNamesin interfaceQueryPlanNode
-
evaluate
public Table evaluate(QueryContext context)
Description copied from interface:QueryPlanNodeEvaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables- Specified by:
evaluatein interfaceQueryPlanNode
-
discoverCorrelatedVariables
public java.util.ArrayList discoverCorrelatedVariables(int level, java.util.ArrayList list)Description copied from interface:QueryPlanNodeDiscovers all the correlated variables in the plan (and plan children) that reference a particular layer. For example, if we wanted to find all the CorrelatedVariable objects that reference the current layer, we would typically call 'discoverCorrelatedVariables(0, new ArrayList())'- Specified by:
discoverCorrelatedVariablesin interfaceQueryPlanNode
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:QueryPlanNodeDeep clones this query plan.- Specified by:
clonein interfaceQueryPlanNode- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
titleString
public java.lang.String titleString()
-
debugString
public void debugString(int level, java.lang.StringBuffer buf)Description copied from interface:QueryPlanNodeWrites a textural representation of the node to the StringBuffer at the given indent level.- Specified by:
debugStringin interfaceQueryPlanNode
-
-