public class RenameNode extends DDLStatementNode
| Modifier and Type | Class and Description |
|---|---|
static class |
RenameNode.RenameType |
| Modifier and Type | Field and Description |
|---|---|
protected String |
newObjectName |
protected TableName |
newTableName |
protected String |
oldObjectName |
protected RenameNode.RenameType |
renamingWhat |
protected boolean |
usedAlterTable |
ADD_TYPE, DROP_TYPE, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPEAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX| Constructor and Description |
|---|
RenameNode() |
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom(QueryTreeNode node)
Fill this node with a deep copy of the given node.
|
String |
getNewObjectName() |
TableName |
getNewTableName() |
String |
getOldObjectName() |
RenameNode.RenameType |
getRenameType() |
void |
init(Object tableName,
Object oldObjectName,
Object newName,
Object usedAlterTable,
Object renamingWhat)
Initializer for a RenameNode
|
boolean |
isAlterTable() |
String |
statementToString() |
String |
toString()
Convert this object to a String.
|
getFullName, getObjectName, getRelativeName, init, initAndCheck, isAtomicaccept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, printSubNodes, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrintprotected TableName newTableName
protected String oldObjectName
protected String newObjectName
protected boolean usedAlterTable
protected RenameNode.RenameType renamingWhat
public void init(Object tableName, Object oldObjectName, Object newName, Object usedAlterTable, Object renamingWhat) throws StandardException
init in class QueryTreeNodetableName - The name of the table. This is the table which is
being renamed in case of rename table. In case of rename
column, the column being renamed belongs to this table.
In case of rename index, this is null because index name
is unique within a schema and doesn't have to be
associated with a table nameoldObjectName - This is either the name of column/index in case
of rename column/index. For rename table, this is null.newObjectName - This is new name for table/column/indexusedAlterTable - True-Used Alter Table, False-Used Rename.
For rename index, this will always be false because
there is no alter table command to rename indexrenamingWhat - Rename a table / column / indexStandardException - Thrown on errorpublic RenameNode.RenameType getRenameType()
public TableName getNewTableName()
public boolean isAlterTable()
public String getOldObjectName()
public String getNewObjectName()
public void copyFrom(QueryTreeNode node) throws StandardException
copyFrom in class DDLStatementNodeStandardExceptionpublic String toString()
toString in class DDLStatementNodepublic String statementToString()
statementToString in class StatementNodeCopyright © 2015 FoundationDB, LLC. All rights reserved.