com.akiban.sql.parser
Class InsertNode
java.lang.Object
com.akiban.sql.parser.QueryTreeNode
com.akiban.sql.parser.StatementNode
com.akiban.sql.parser.DMLStatementNode
com.akiban.sql.parser.DMLModStatementNode
com.akiban.sql.parser.InsertNode
- All Implemented Interfaces:
- Visitable
public final class InsertNode
- extends DMLModStatementNode
An InsertNode is the top node in a query tree for an
insert statement.
After parsing, the node contains
targetTableName: the target table for the insert
collist: a list of column names, if specified
queryexpr: the expression being inserted, either
a values clause or a select form; both
of these are represented via the SelectNode,
potentially with a TableOperatorNode such as
UnionNode above it.
After binding, the node has had the target table's
descriptor located and inserted, and the queryexpr
and collist have been massaged so that they are identical
to the table layout. This involves adding any default
values for missing columns, and reordering the columns
to match the table's ordering of them.
After optimizing, ...
| Methods inherited from class com.akiban.sql.parser.QueryTreeNode |
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, 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 |
InsertNode
public InsertNode()
init
public void init(Object targetName,
Object insertColumns,
Object queryExpression,
Object targetProperties,
Object orderByList,
Object offset,
Object fetchFirst,
Object returningList)
- Initializer for an InsertNode.
- Overrides:
init in class QueryTreeNode
- Parameters:
targetName - The name of the table/VTI to insert intoinsertColumns - A ResultColumnList with the names of the
columns to insert into. May be null if the
user did not specify the columns - in this
case, the binding phase will have to figure
it out.queryExpression - The query expression that will generate
the rows to insert into the given tabletargetProperties - The properties specified on the target tableorderByList - The order by list for the source result set, null if
no order by list
copyFrom
public void copyFrom(QueryTreeNode node)
throws StandardException
- Fill this node with a deep copy of the given node.
- Overrides:
copyFrom in class DMLModStatementNode
- Throws:
StandardException
statementToString
public String statementToString()
- Specified by:
statementToString in class StatementNode
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 DMLModStatementNode
- Parameters:
depth - The depth of this node in the tree
getStatementType
protected int getStatementType()
- Return the type of statement, something from
StatementType.
- Overrides:
getStatementType in class QueryTreeNode
- Returns:
- the type of statement
getTargetColumnList
public ResultColumnList getTargetColumnList()
getTargetProperties
public Properties getTargetProperties()
getOrderByList
public OrderByList getOrderByList()
getOffset
public ValueNode getOffset()
getFetchFirst
public ValueNode getFetchFirst()
Copyright © 2013 Akiban Technologies, Inc. All rights reserved.