class CreateTriggerConstantAction extends DDLSingleTableConstantAction
Modifier and Type | Field and Description |
---|---|
private UUID |
actionSPSId |
private java.lang.String |
actionText |
private int |
eventMask |
private boolean |
isBefore |
private boolean |
isEnabled |
private boolean |
isRow |
private java.lang.String |
newReferencingName |
private java.lang.String |
oldReferencingName |
private java.lang.String |
originalActionText |
private java.lang.String |
originalWhenText |
private ProviderInfo[] |
providerInfo |
private int[] |
referencedCols |
private int[] |
referencedColsInTriggerAction |
private boolean |
referencingNew |
private boolean |
referencingOld |
private UUID |
spsCompSchemaId |
private java.lang.String |
triggerName |
private java.lang.String |
triggerSchemaName |
private TableDescriptor |
triggerTable |
private UUID |
triggerTableId |
private UUID |
whenSPSId |
private java.lang.String |
whenText |
tableId
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
Constructor and Description |
---|
CreateTriggerConstantAction(java.lang.String triggerSchemaName,
java.lang.String triggerName,
int eventMask,
boolean isBefore,
boolean isRow,
boolean isEnabled,
TableDescriptor triggerTable,
UUID whenSPSId,
java.lang.String whenText,
UUID actionSPSId,
java.lang.String actionText,
UUID spsCompSchemaId,
int[] referencedCols,
int[] referencedColsInTriggerAction,
java.lang.String originalWhenText,
java.lang.String originalActionText,
boolean referencingOld,
boolean referencingNew,
java.lang.String oldReferencingName,
java.lang.String newReferencingName,
ProviderInfo[] providerInfo)
Make the ConstantAction for a CREATE TRIGGER statement.
|
Modifier and Type | Method and Description |
---|---|
private SPSDescriptor |
createSPS(LanguageConnectionContext lcc,
DataDescriptorGenerator ddg,
DataDictionary dd,
TransactionController tc,
UUID triggerId,
SchemaDescriptor sd,
UUID spsId,
UUID compSchemaId,
java.lang.String text,
boolean isWhen,
TableDescriptor triggerTable) |
void |
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for CREATE TRIGGER.
|
private java.sql.Timestamp |
makeCreationTimestamp(DataDictionary dd)
Construct the creation timestamp for the trigger.
|
java.lang.String |
toString() |
dropConglomerate, dropConglomerate, dropConstraint, dropConstraint, dropConstraint, executeConglomReplacement, getConglomReplacementAction, recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges
private java.lang.String triggerName
private java.lang.String triggerSchemaName
private TableDescriptor triggerTable
private UUID triggerTableId
private int eventMask
private boolean isBefore
private boolean isRow
private boolean isEnabled
private boolean referencingOld
private boolean referencingNew
private UUID whenSPSId
private java.lang.String whenText
private UUID actionSPSId
private java.lang.String actionText
private final java.lang.String originalWhenText
private java.lang.String originalActionText
private java.lang.String oldReferencingName
private java.lang.String newReferencingName
private UUID spsCompSchemaId
private int[] referencedCols
private int[] referencedColsInTriggerAction
private final ProviderInfo[] providerInfo
CreateTriggerConstantAction(java.lang.String triggerSchemaName, java.lang.String triggerName, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor triggerTable, UUID whenSPSId, java.lang.String whenText, UUID actionSPSId, java.lang.String actionText, UUID spsCompSchemaId, int[] referencedCols, int[] referencedColsInTriggerAction, java.lang.String originalWhenText, java.lang.String originalActionText, boolean referencingOld, boolean referencingNew, java.lang.String oldReferencingName, java.lang.String newReferencingName, ProviderInfo[] providerInfo)
triggerSchemaName
- name for the schema that trigger lives in.triggerName
- Name of triggereventMask
- TriggerDescriptor.TRIGGER_EVENT_XXXXisBefore
- is this a before (as opposed to after) triggerisRow
- is this a row trigger or statement triggerisEnabled
- is this trigger enabled or disabledtriggerTable
- the table upon which this trigger is definedwhenSPSId
- the sps id for the when clause (may be null)whenText
- the text of the when clause (may be null)actionSPSId
- the spsid for the trigger action (may be null)actionText
- the text of the trigger actionspsCompSchemaId
- the compilation schema for the action and when
spses. If null, will be set to the current default
schemareferencedCols
- what columns does this trigger reference (may be null)referencedColsInTriggerAction
- what columns does the trigger
action reference through old/new transition variables
(may be null)originalWhenText
- The original user text of the WHEN clause (may be null)originalActionText
- The original user text of the trigger actionreferencingOld
- whether or not OLD appears in REFERENCING clausereferencingNew
- whether or not NEW appears in REFERENCING clauseoldReferencingName
- old referencing table name, if any, that appears in REFERENCING clausenewReferencingName
- new referencing table name, if any, that appears in REFERENCING clauseproviderInfo
- array of providers that the trigger depends onpublic void executeConstantAction(Activation activation) throws StandardException
activation
- The execution environment for this constant action.StandardException
- Thrown on failureConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
private SPSDescriptor createSPS(LanguageConnectionContext lcc, DataDescriptorGenerator ddg, DataDictionary dd, TransactionController tc, UUID triggerId, SchemaDescriptor sd, UUID spsId, UUID compSchemaId, java.lang.String text, boolean isWhen, TableDescriptor triggerTable) throws StandardException
StandardException
public java.lang.String toString()
toString
in class java.lang.Object
private java.sql.Timestamp makeCreationTimestamp(DataDictionary dd) throws StandardException
StandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.