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, targetVTIAUTOINCREMENT_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() |
Properties |
getTargetProperties() |
void |
init(Object targetName,
Object insertColumns,
Object queryExpression,
Object targetProperties,
Object orderByList,
Object offset,
Object fetchFirst,
Object returningList)
Initializer for an InsertNode.
|
void |
printSubNodes(int depth)
Prints the sub-nodes of this object.
|
String |
statementToString() |
getReturningList, getTargetTableName, init, init, isAtomic, setReturningListgetResultSetNodetoStringaccept, 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, treePrintpublic void init(Object targetName, Object insertColumns, Object queryExpression, Object targetProperties, Object orderByList, Object offset, Object fetchFirst, Object returningList)
init in class QueryTreeNodetargetName - 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 DMLModStatementNodeStandardExceptionpublic String statementToString()
statementToString in class StatementNodepublic void printSubNodes(int depth)
printSubNodes in class DMLModStatementNodedepth - The depth of this node in the treeprotected int getStatementType()
getStatementType in class QueryTreeNodepublic ResultColumnList getTargetColumnList()
public Properties getTargetProperties()
public OrderByList getOrderByList()
public ValueNode getOffset()
public ValueNode getFetchFirst()
Copyright © 2015 FoundationDB, LLC. All rights reserved.