com.akiban.sql.parser
Class FromSubquery

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.ResultSetNode
          extended by com.akiban.sql.parser.FromTable
              extended by com.akiban.sql.parser.FromSubquery
All Implemented Interfaces:
Visitable

public class FromSubquery
extends FromTable

A FromSubquery represents a subquery in the FROM list of a DML statement. The current implementation of this class is only sufficient for Insert's need to push a new select on top of the one the user specified, to make the selected structure match that of the insert target table.


Field Summary
 
Fields inherited from class com.akiban.sql.parser.FromTable
correlationName, origTableName, tableProperties
 
Fields inherited from class com.akiban.sql.parser.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
 
Constructor Summary
FromSubquery()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 String getExposedName()
          Get the exposed name for this table, which is the name that can be used to refer to it in the rest of the query.
 ValueNode getFetchFirst()
           
 ValueNode getOffset()
           
 OrderByList getOrderByList()
           
 ResultSetNode getSubquery()
          Return the "subquery" from this node.
 void init(Object subquery, Object orderByList, Object offset, Object fetchFirst, Object correlationName, Object derivedRCL, Object tableProperties)
          Intializer for a table in a FROM list.
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 
Methods inherited from class com.akiban.sql.parser.FromTable
getCorrelationName, getOrigTableName, getTableName, init, setCorrelationName, setOrigTableName, toString
 
Methods inherited from class com.akiban.sql.parser.ResultSetNode
getResultColumns, setInsertSource, setResultColumns
 
Methods inherited from class com.akiban.sql.parser.QueryTreeNode
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromSubquery

public FromSubquery()
Method Detail

init

public void init(Object subquery,
                 Object orderByList,
                 Object offset,
                 Object fetchFirst,
                 Object correlationName,
                 Object derivedRCL,
                 Object tableProperties)
Intializer for a table in a FROM list.

Overrides:
init in class QueryTreeNode
Parameters:
subquery - The subquery
orderByList - ORDER BY list if any, or null
offset - OFFSET if any, or null
fetchFirst - FETCH FIRST if any, or null
correlationName - The correlation name
derivedRCL - The derived column list
tableProperties - Properties list associated with the table

copyFrom

public void copyFrom(QueryTreeNode node)
              throws StandardException
Fill this node with a deep copy of the given node.

Overrides:
copyFrom in class FromTable
Throws:
StandardException

printSubNodes

public void printSubNodes(int depth)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

Overrides:
printSubNodes in class ResultSetNode
Parameters:
depth - The depth of this node in the tree

getSubquery

public ResultSetNode getSubquery()
Return the "subquery" from this node.

Returns:
ResultSetNode The "subquery" from this node.

getExposedName

public String getExposedName()
Get the exposed name for this table, which is the name that can be used to refer to it in the rest of the query.

Overrides:
getExposedName in class FromTable
Returns:
The exposed name for this table.

getOrderByList

public OrderByList getOrderByList()

getOffset

public ValueNode getOffset()

getFetchFirst

public ValueNode getFetchFirst()


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.