Class QueryPlan.SingleRowTableNode

java.lang.Object
com.mckoi.database.QueryPlan.SingleRowTableNode
All Implemented Interfaces:
QueryPlanNode, Serializable, Cloneable
Enclosing class:
QueryPlan

public static class QueryPlan.SingleRowTableNode extends 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:
  • Constructor Details

    • SingleRowTableNode

      public SingleRowTableNode()
  • Method Details

    • discoverTableNames

      public ArrayList discoverTableNames(ArrayList list)
      Description copied from interface: QueryPlanNode
      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.

      Specified by:
      discoverTableNames in interface QueryPlanNode
    • evaluate

      public Table evaluate(QueryContext context)
      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 interface QueryPlanNode
    • discoverCorrelatedVariables

      public ArrayList discoverCorrelatedVariables(int level, ArrayList list)
      Description copied from interface: QueryPlanNode
      Discovers 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:
      discoverCorrelatedVariables in interface QueryPlanNode
    • clone

      public Object clone() throws CloneNotSupportedException
      Description copied from interface: QueryPlanNode
      Deep clones this query plan.
      Specified by:
      clone in interface QueryPlanNode
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • titleString

      public String titleString()
    • debugString

      public void debugString(int level, StringBuffer buf)
      Description copied from interface: QueryPlanNode
      Writes a textural representation of the node to the StringBuffer at the given indent level.
      Specified by:
      debugString in interface QueryPlanNode