public final class InsertNode extends DMLModStatementNode
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, ...
returningColumnList, targetTableName, targetVTI
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
InsertNode() |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(QueryTreeNode node)
Fill this node with a deep copy of the given node.
|
ValueNode |
getFetchFirst() |
ValueNode |
getOffset() |
OrderByList |
getOrderByList() |
protected int |
getStatementType()
Return the type of statement, something from
StatementType.
|
ResultColumnList |
getTargetColumnList() |
java.util.Properties |
getTargetProperties() |
void |
init(java.lang.Object targetName,
java.lang.Object insertColumns,
java.lang.Object queryExpression,
java.lang.Object targetProperties,
java.lang.Object orderByList,
java.lang.Object offset,
java.lang.Object fetchFirst,
java.lang.Object returningList)
Initializer for an InsertNode.
|
void |
printSubNodes(int depth)
Prints the sub-nodes of this object.
|
java.lang.String |
statementToString() |
getReturningList, getTargetTableName, init, init, isAtomic, setReturningList
getResultSetNode
toString
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
public void init(java.lang.Object targetName, java.lang.Object insertColumns, java.lang.Object queryExpression, java.lang.Object targetProperties, java.lang.Object orderByList, java.lang.Object offset, java.lang.Object fetchFirst, java.lang.Object returningList)
init
in class QueryTreeNode
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 listpublic void copyFrom(QueryTreeNode node) throws StandardException
copyFrom
in class DMLModStatementNode
StandardException
public java.lang.String statementToString()
statementToString
in class StatementNode
public void printSubNodes(int depth)
printSubNodes
in class DMLModStatementNode
depth
- The depth of this node in the treeprotected int getStatementType()
getStatementType
in class QueryTreeNode
public ResultColumnList getTargetColumnList()
public java.util.Properties getTargetProperties()
public OrderByList getOrderByList()
public ValueNode getOffset()
public ValueNode getFetchFirst()
Copyright © 2013. All Rights Reserved.