abstract class DDLConstantAction extends java.lang.Object implements ConstantAction
Modifier and Type | Class and Description |
---|---|
private static class |
DDLConstantAction.SettableBoolean
Mutable Boolean wrapper, initially false
|
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
Constructor and Description |
---|
DDLConstantAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
addColumnDependencies(LanguageConnectionContext lcc,
DataDictionary dd,
TableDescriptor td,
ColumnInfo ci)
Add dependencies of a column on providers.
|
protected void |
adjustUDTDependencies(LanguageConnectionContext lcc,
DataDictionary dd,
AliasDescriptor ad,
boolean adding)
Add and drop dependencies of a routine on UDTs.
|
private void |
adjustUDTDependencies(LanguageConnectionContext lcc,
DataDictionary dd,
Dependent dependent,
java.util.HashMap<java.lang.String,AliasDescriptor> addUdtMap,
java.util.HashMap<java.lang.String,AliasDescriptor> dropUdtMap)
Add and drop dependencies of an object on UDTs.
|
protected void |
adjustUDTDependencies(LanguageConnectionContext lcc,
DataDictionary dd,
TableDescriptor td,
ColumnInfo[] columnInfos,
boolean dropWholeTable)
Adjust dependencies of a table on ANSI UDTs.
|
protected java.lang.String |
constructToString(java.lang.String statementType,
java.lang.String objectName) |
private static void |
executeCAPreferSubTrans(CreateSchemaConstantAction csca,
TransactionController tc,
Activation activation) |
private static PermissionsDescriptor |
findRoleUsage(Activation activation,
StatementPermission statPerm)
We have determined that the statement permission described by statPerm
is not granted to the current user nor to PUBLIC, so it must be granted
to the current role or one of the roles inherited by the current
role.
|
(package private) static SchemaDescriptor |
getAndCheckSchemaDescriptor(DataDictionary dd,
UUID schemaId,
java.lang.String statementType)
Get the schema descriptor for the schemaid.
|
(package private) static SchemaDescriptor |
getSchemaDescriptorForCreate(DataDictionary dd,
Activation activation,
java.lang.String schemaName)
Get the schema descriptor in the creation of an object in
the passed in schema.
|
private boolean |
inProviderSet(ProviderInfo[] providers,
UUID routineId) |
(package private) void |
lockTableForDDL(TransactionController tc,
long heapConglomerateNumber,
boolean exclusiveMode)
Lock the table in exclusive or share mode to prevent deadlocks.
|
protected void |
storeConstraintDependenciesOnPrivileges(Activation activation,
Dependent dependent,
UUID refTableUUID,
ProviderInfo[] providers)
This method saves dependencies of constraints on privileges in the
dependency system.
|
protected void |
storeViewTriggerDependenciesOnPrivileges(Activation activation,
Dependent dependent)
This method saves dependencies of views and triggers on privileges in
the dependency system.
|
private static void |
trackRoleDependency(Activation activation,
Dependent dependent,
DDLConstantAction.SettableBoolean roleDepAdded)
The statement permission needed for dependent has been found to rely on
the current role.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeConstantAction
static SchemaDescriptor getAndCheckSchemaDescriptor(DataDictionary dd, UUID schemaId, java.lang.String statementType) throws StandardException
dd
- the data dictionaryschemaId
- the schema idstatementType
- string describing type of statement for error
reporting. e.g. "ALTER STATEMENT"StandardException
- if schema is system schemastatic SchemaDescriptor getSchemaDescriptorForCreate(DataDictionary dd, Activation activation, java.lang.String schemaName) throws StandardException
dd
- the data dictionaryactivation
- activationschemaName
- name of the schemaStandardException
- if the schema does not existprivate static void executeCAPreferSubTrans(CreateSchemaConstantAction csca, TransactionController tc, Activation activation) throws StandardException
StandardException
final void lockTableForDDL(TransactionController tc, long heapConglomerateNumber, boolean exclusiveMode) throws StandardException
tc
- The TransactionControllerheapConglomerateNumber
- The conglomerate number for the heap.exclusiveMode
- Whether or not to lock the table in exclusive mode.StandardException
- if schema is system schemaprotected java.lang.String constructToString(java.lang.String statementType, java.lang.String objectName)
protected void storeConstraintDependenciesOnPrivileges(Activation activation, Dependent dependent, UUID refTableUUID, ProviderInfo[] providers) throws StandardException
activation
- The execution environment for this constant action.dependent
- Make this object depend on required privilegesrefTableUUID
- Make sure we are looking for REFERENCES privilege
for right tableproviders
- set of providers for this constraintStandardException
- Thrown on failureprivate static PermissionsDescriptor findRoleUsage(Activation activation, StatementPermission statPerm) throws StandardException
StandardException
private static void trackRoleDependency(Activation activation, Dependent dependent, DDLConstantAction.SettableBoolean roleDepAdded) throws StandardException
activation
- the current activationdependent
- the view, constraint or trigger that is dependent on the
current role for some privilege.roleDepAdded
- keeps track of whether a dependency on the
current role has already been registered.StandardException
protected void storeViewTriggerDependenciesOnPrivileges(Activation activation, Dependent dependent) throws StandardException
activation
- The execution environment for this constant action.dependent
- Make this object depend on required privilegesStandardException
- Thrown on failureprivate boolean inProviderSet(ProviderInfo[] providers, UUID routineId)
protected void addColumnDependencies(LanguageConnectionContext lcc, DataDictionary dd, TableDescriptor td, ColumnInfo ci) throws StandardException
StandardException
protected void adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, TableDescriptor td, ColumnInfo[] columnInfos, boolean dropWholeTable) throws StandardException
StandardException
private void adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, Dependent dependent, java.util.HashMap<java.lang.String,AliasDescriptor> addUdtMap, java.util.HashMap<java.lang.String,AliasDescriptor> dropUdtMap) throws StandardException
lcc
- Interpreter's state variable for this session.dd
- Metadatadependent
- Object which depends on UDTaddUdtMap
- Map of UDTs for which dependencies should be addeddropUdtMap
- Map of UDT for which dependencies should be droppedStandardException
protected void adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, AliasDescriptor ad, boolean adding) throws StandardException
lcc
- Interpreter's state variable for this session.dd
- Metadataad
- Alias descriptor for the routineadding
- True if we are adding dependencies, false if we're dropping themStandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.