|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.akiban.sql.parser.QueryTreeNode
com.akiban.sql.parser.ResultSetNode
com.akiban.sql.parser.FromTable
com.akiban.sql.parser.FromBaseTable
public class FromBaseTable
A FromBaseTable represents a table in the FROM list of a DML statement, as distinguished from a FromSubquery, which represents a subquery in the FROM list. A FromBaseTable may actually represent a view. During parsing, we can't distinguish views from base tables. During binding, when we find FromBaseTables that represent views, we replace them with FromSubqueries. By the time we get to code generation, all FromSubqueries have been eliminated, and all FromBaseTables will represent only true base tables.
Positioned Update: Currently, all columns of an updatable cursor are selected to deal with a positioned update. This is because we don't know what columns will ultimately be needed from the UpdateNode above us. For example, consider:
get c as 'select cint from t for update of ctinyint' update t set ctinyint = csmallintIdeally, the cursor only selects cint. Then, something akin to an IndexRowToBaseRow is generated to take the CursorResultSet and get the appropriate columns out of the base table from the RowLocation retunrned by the cursor. Then the update node can generate the appropriate NormalizeResultSet (or whatever else it might need) to get things into the correct format for the UpdateResultSet. See CurrentOfNode for more information.
| Nested Class Summary | |
|---|---|
static class |
FromBaseTable.UpdateOrDelete
|
| 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 | |
|---|---|
FromBaseTable()
|
|
| 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()
Get the exposed table name for this table, which is the name that can be used to refer to it in the rest of the query. |
IndexHintList |
getIndexHints()
|
TableName |
getTableName()
Return the table name for this table. |
void |
init(Object arg1,
Object arg2,
Object arg3)
Initializer for a table in a DELETE/ UPDATE. |
void |
init(Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5)
Initializer for a table in a FROM list. |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
void |
setTableProperties(Properties tableProperties)
Set the table properties for this table. |
String |
toString()
Convert this object to a String. |
| Methods inherited from class com.akiban.sql.parser.FromTable |
|---|
getCorrelationName, getOrigTableName, 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 |
|---|
public FromBaseTable()
| Method Detail |
|---|
public void init(Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5)
init in class QueryTreeNode
public void init(Object arg1,
Object arg2,
Object arg3)
init in class QueryTreeNode
public void copyFrom(QueryTreeNode node)
throws StandardException
copyFrom in class FromTableStandardExceptionpublic String toString()
toString in class FromTablepublic void setTableProperties(Properties tableProperties)
tableProperties - The new table properties.public String getExposedName()
getExposedName in class FromTable
public TableName getExposedTableName()
throws StandardException
StandardException - Thrown on error
public TableName getTableName()
throws StandardException
getTableName in class FromTableStandardException - Thrown on errorpublic IndexHintList getIndexHints()
public void printSubNodes(int depth)
printSubNodes in class ResultSetNodedepth - The depth of this node in the tree
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||