abstract class DDLStatementNode extends StatementNode
Modifier and Type | Field and Description |
---|---|
static int |
ADD_TYPE |
static int |
DROP_STATISTICS |
static int |
DROP_TYPE |
(package private) boolean |
implicitCreateSchema
sub-classes can set this to be true to allow implicit
creation of the main object's schema at execution time.
|
private boolean |
initOk |
static int |
LOCKING_TYPE |
static int |
MODIFY_TYPE |
private TableName |
tableName |
static int |
UNKNOWN_TYPE |
static int |
UPDATE_STATISTICS |
EMPTY_TD_LIST, NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
DDLStatementNode(ContextManager cm) |
DDLStatementNode(TableName tableName,
ContextManager cm) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
acceptChildren(Visitor v)
Accept a visitor on all child nodes.
|
(package private) int |
activationKind() |
private TableDescriptor |
checkTableDescriptor(TableDescriptor td,
boolean doSystemTableCheck) |
(package private) void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
Generic generate code for all DDL statements.
|
(package private) java.lang.String |
getFullName()
Return the full dot expression name of the
object being dropped.
|
TableName |
getObjectName() |
(package private) java.lang.String |
getRelativeName()
Return the name of the table being dropped.
|
protected SchemaDescriptor |
getSchemaDescriptor()
Get a schema descriptor for this DDL object.
|
protected SchemaDescriptor |
getSchemaDescriptor(boolean ownerCheck,
boolean doSystemSchemaCheck)
Get a schema descriptor for this DDL object.
|
protected TableDescriptor |
getTableDescriptor() |
protected TableDescriptor |
getTableDescriptor(boolean doSystemTableCheck)
Validate that the table is ok for DDL -- e.g.
|
protected TableDescriptor |
getTableDescriptor(TableName tableName)
Validate that the table is ok for DDL -- e.g.
|
protected TableDescriptor |
getTableDescriptor(UUID tableId) |
protected void |
initAndCheck(java.lang.Object objectName)
Initialize the object name we will be performing the DDL
on and check that we are not in the system schema
and that DDL is allowed.
|
boolean |
isAtomic()
A DDL statement is always atomic
|
private TableDescriptor |
justGetDescriptor(TableName tableName)
Just get the table descriptor.
|
(package private) FromList |
makeFromList(DataDictionary dd,
TableElementList tableElementList,
boolean creatingTable)
Make a from list for binding query fragments in a CREATE/ALTER TABLE
statement.
|
java.lang.String |
toString()
Convert this object to a String.
|
bindStatement, executeSchemaName, executeStatementName, generate, getCursorInfo, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement, statementToString, updateIndexStatisticsFor
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
public static final int UNKNOWN_TYPE
public static final int ADD_TYPE
public static final int DROP_TYPE
public static final int MODIFY_TYPE
public static final int LOCKING_TYPE
public static final int UPDATE_STATISTICS
public static final int DROP_STATISTICS
private TableName tableName
private boolean initOk
boolean implicitCreateSchema
DDLStatementNode(TableName tableName, ContextManager cm)
DDLStatementNode(ContextManager cm)
protected void initAndCheck(java.lang.Object objectName) throws StandardException
StandardException
public boolean isAtomic()
isAtomic
in class StatementNode
java.lang.String getRelativeName()
java.lang.String getFullName()
public final TableName getObjectName()
public java.lang.String toString()
toString
in class StatementNode
int activationKind()
activationKind
in class StatementNode
final void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
generate
in class QueryTreeNode
acb
- The ActivationClassBuilder for the class being builtmb
- The execute() method to be builtStandardException
- Thrown on errorprotected final SchemaDescriptor getSchemaDescriptor() throws StandardException
StandardException
- throws on schema name
that doesn't existprotected final SchemaDescriptor getSchemaDescriptor(boolean ownerCheck, boolean doSystemSchemaCheck) throws StandardException
ownerCheck
- If check for schema owner is neededdoSystemSchemaCheck
- If check for system schema is needed.
If set to true, then throw an exception if schema descriptor
is requested for a system schema. The only time this param
will be set to false is when user is asking for inplace
compress of a system table. DERBY-1062StandardException
- throws on schema name
that doesn't existprotected final TableDescriptor getTableDescriptor() throws StandardException
StandardException
protected final TableDescriptor getTableDescriptor(boolean doSystemTableCheck) throws StandardException
StandardException
- on errorprotected final TableDescriptor getTableDescriptor(UUID tableId) throws StandardException
StandardException
protected final TableDescriptor getTableDescriptor(TableName tableName) throws StandardException
StandardException
- on errorprivate TableDescriptor justGetDescriptor(TableName tableName) throws StandardException
tableName
- StandardException
- on errorprivate TableDescriptor checkTableDescriptor(TableDescriptor td, boolean doSystemTableCheck) throws StandardException
StandardException
FromList makeFromList(DataDictionary dd, TableElementList tableElementList, boolean creatingTable) throws StandardException
dd
- Metadata.tableElementList
- the parenthesized list of columns and constraints in a CREATE/ALTER TABLE statementcreatingTable
- true if this is for CREATE TABLE. false if this is for ALTER TABLEStandardException
void acceptChildren(Visitor v) throws StandardException
QueryTreeNode
accept(v)
on all visitable fields, as well as
super.acceptChildren(v)
to make sure all visitable fields
defined by the super-class are accepted too.acceptChildren
in class QueryTreeNode
v
- the visitorStandardException
- on errors raised by the visitorApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.