com.akiban.sql.parser
Class FromTable

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.ResultSetNode
          extended by com.akiban.sql.parser.FromTable
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
CurrentOfNode, DistinctNode, FromBaseTable, FromSubquery, FromVTI, JoinNode, RowCountNode, RowResultSetNode, RowsResultSetNode, SetOperatorNode

public abstract class FromTable
extends ResultSetNode

A FromTable represents a table in the FROM clause of a DML statement. It can be either a base table, a subquery or a project restrict.

See Also:
FromBaseTable, FromSubquery, ProjectRestrictNode

Field Summary
protected  String correlationName
           
protected  TableName origTableName
          the original unbound table name
protected  Properties 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
FromTable()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 String getCorrelationName()
          Get this table's correlation name, if any.
 String getExposedName()
           
 TableName getOrigTableName()
          Gets the original or unbound table name for this FromTable.
 TableName getTableName()
          Return a TableName node representing this FromTable.
 void init(Object correlationName, Object tableProperties)
          Initializer for a table in a FROM list.
 void setCorrelationName(String correlationName)
          Set this table's correlation name.
 void setOrigTableName(TableName tableName)
          Sets the original or unbound table name for this FromTable.
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.ResultSetNode
getResultColumns, printSubNodes, 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, 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
 

Field Detail

tableProperties

protected Properties tableProperties

correlationName

protected String correlationName

origTableName

protected TableName origTableName
the original unbound table name

Constructor Detail

FromTable

public FromTable()
Method Detail

init

public void init(Object correlationName,
                 Object tableProperties)
Initializer for a table in a FROM list.

Overrides:
init in class QueryTreeNode
Parameters:
correlationName - The correlation name
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 ResultSetNode
Throws:
StandardException

getCorrelationName

public String getCorrelationName()
Get this table's correlation name, if any.


setCorrelationName

public void setCorrelationName(String correlationName)
Set this table's correlation name.


toString

public String toString()
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Overrides:
toString in class ResultSetNode
Returns:
This object as a String

getTableName

public TableName getTableName()
                       throws StandardException
Return a TableName node representing this FromTable. Expect this to be overridden (and used) by subclasses that may set correlationName to null.

Returns:
a TableName node representing this FromTable.
Throws:
StandardException - Thrown on error

getExposedName

public String getExposedName()
                      throws StandardException
Throws:
StandardException

setOrigTableName

public void setOrigTableName(TableName tableName)
Sets the original or unbound table name for this FromTable.

Parameters:
tableName - the unbound table name

getOrigTableName

public TableName getOrigTableName()
Gets the original or unbound table name for this FromTable. The tableName field can be changed due to synonym resolution. Use this method to retrieve the actual unbound tablename.

Returns:
TableName the original or unbound tablename


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