com.akiban.sql.parser
Class FromVTI

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.FromVTI
All Implemented Interfaces:
Visitable

public class FromVTI
extends FromTable

A FromVTI represents a VTI in the FROM list of a DML statement.


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
FromVTI()
           
 
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.
 TableName getExposedTableName()
           
 MethodCallNode getMethodCall()
          Return the constructor or static method invoked from this node
 void init(Object invocation, Object correlationName, Object derivedRCL, Object tableProperties)
          Initialize a query tree node.
 void init(Object invocation, Object correlationName, Object derivedRCL, Object tableProperties, Object exposedTableName)
          Initialize a query tree node.
 boolean isConstructor()
          Return true if this VTI is a constructor.
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 boolean referencesTarget(String name, boolean baseTable)
          Search to see if a query references the specifed table name.
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.FromTable
getCorrelationName, getOrigTableName, getTableName, init, setCorrelationName, setOrigTableName
 
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, 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

FromVTI

public FromVTI()
Method Detail

init

public void init(Object invocation,
                 Object correlationName,
                 Object derivedRCL,
                 Object tableProperties)
          throws StandardException
Description copied from class: QueryTreeNode
Initialize a query tree node.

Overrides:
init in class QueryTreeNode
Parameters:
invocation - The constructor or static method for the VTI
correlationName - The correlation name
derivedRCL - The derived column list
tableProperties - Properties list associated with the table
Throws:
StandardException - Thrown on error

init

public void init(Object invocation,
                 Object correlationName,
                 Object derivedRCL,
                 Object tableProperties,
                 Object exposedTableName)
          throws StandardException
Description copied from class: QueryTreeNode
Initialize a query tree node.

Overrides:
init in class QueryTreeNode
Parameters:
invocation - The constructor or static method for the VTI
correlationName - The correlation name
derivedRCL - The derived column list
tableProperties - Properties list associated with the table
exposedTableName - The table name (TableName class)
Throws:
StandardException - Thrown on error

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

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 FromTable
Returns:
This object as a String

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

isConstructor

public boolean isConstructor()
Return true if this VTI is a constructor. Otherwise, it is a static method.


getMethodCall

public MethodCallNode getMethodCall()
Return the constructor or static method invoked 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.

getExposedTableName

public TableName getExposedTableName()
Returns:
the table name used for matching with column references.

referencesTarget

public boolean referencesTarget(String name,
                                boolean baseTable)
                         throws StandardException
Search to see if a query references the specifed table name.

Parameters:
name - Table name (String) to search for.
baseTable - Whether or not name is for a base table
Returns:
true if found, else false
Throws:
StandardException - Thrown on error


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