|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.StatementNode
org.apache.derby.impl.sql.compile.DDLStatementNode
org.apache.derby.impl.sql.compile.CreateTriggerNode
public class CreateTriggerNode
A CreateTriggerNode is the root of a QueryTree that represents a CREATE TRIGGER statement.
| Field Summary | |
|---|---|
private UUID |
actionCompSchemaId
|
private StatementNode |
actionNode
|
private int |
actionOffset
|
private java.lang.String |
actionText
|
private SchemaDescriptor |
compSchemaDescriptor
|
private boolean |
isBefore
|
private boolean |
isEnabled
|
private boolean |
isRow
|
private boolean |
newTableInReferencingClause
|
private java.lang.String |
newTableName
|
private static java.util.Comparator |
OFFSET_COMPARATOR
Comparator that can be used for sorting lists of FromBaseTables on the position they have in the SQL query string. |
private boolean |
oldTableInReferencingClause
|
private java.lang.String |
oldTableName
|
private java.lang.String |
originalActionText
|
private java.util.List |
refClause
|
private int[] |
referencedColInts
|
private int[] |
referencedColsInTriggerAction
|
private TableName |
tableName
|
private ResultColumnList |
triggerCols
|
private int |
triggerEventMask
|
private TableName |
triggerName
|
private SchemaDescriptor |
triggerSchemaDescriptor
|
private TableDescriptor |
triggerTableDescriptor
|
private ValueNode |
whenClause
|
private int |
whenOffset
|
private java.lang.String |
whenText
|
| Fields inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode |
|---|
ADD_TYPE, DROP_STATISTICS, DROP_TYPE, implicitCreateSchema, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPE, UPDATE_STATISTICS |
| Fields inherited from class org.apache.derby.impl.sql.compile.StatementNode |
|---|
EMPTY_TD_LIST, NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION |
| Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
|---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
| Constructor Summary | |
|---|---|
CreateTriggerNode()
|
|
| Method Summary | |
|---|---|
private boolean |
bindReferencesClause(DataDictionary dd)
|
void |
bindStatement()
Bind this CreateTriggerNode. |
private void |
checkInvalidTriggerReference(java.lang.String tableName)
|
private boolean |
equals(java.lang.String left,
java.lang.String right)
|
private void |
forbidActionsOnGenCols()
|
void |
init(java.lang.Object triggerName,
java.lang.Object tableName,
java.lang.Object triggerEventMask,
java.lang.Object triggerCols,
java.lang.Object isBefore,
java.lang.Object isRow,
java.lang.Object isEnabled,
java.lang.Object refClause,
java.lang.Object whenClause,
java.lang.Object whenText,
java.lang.Object whenOffset,
java.lang.Object actionNode,
java.lang.Object actionText,
java.lang.Object actionOffset)
Initializer for a CreateTriggerNode |
private int[] |
justTheRequiredColumns(int[] columnsArrary)
|
ConstantAction |
makeConstantAction()
Create the Constant information that will drive the guts of Execution. |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
boolean |
referencesSessionSchema()
Return true if the node references SESSION schema tables (temporary or permanent) |
java.lang.String |
statementToString()
|
java.lang.String |
toString()
Convert this object to a String. |
private void |
validateReferencesClause(DataDictionary dd)
|
| Methods inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode |
|---|
activationKind, bindName, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, init, initAndCheck, isAtomic, makeFromList |
| Methods inherited from class org.apache.derby.impl.sql.compile.StatementNode |
|---|
executeSchemaName, executeStatementName, generate, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement, updateIndexStatisticsFor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private TableName triggerName
private TableName tableName
private int triggerEventMask
private ResultColumnList triggerCols
private boolean isBefore
private boolean isRow
private boolean isEnabled
private java.util.List refClause
private ValueNode whenClause
private java.lang.String whenText
private int whenOffset
private StatementNode actionNode
private java.lang.String actionText
private java.lang.String originalActionText
private int actionOffset
private SchemaDescriptor triggerSchemaDescriptor
private SchemaDescriptor compSchemaDescriptor
private int[] referencedColInts
private int[] referencedColsInTriggerAction
private TableDescriptor triggerTableDescriptor
private UUID actionCompSchemaId
private java.lang.String oldTableName
private java.lang.String newTableName
private boolean oldTableInReferencingClause
private boolean newTableInReferencingClause
private static final java.util.Comparator OFFSET_COMPARATOR
| Constructor Detail |
|---|
public CreateTriggerNode()
| Method Detail |
|---|
public void init(java.lang.Object triggerName,
java.lang.Object tableName,
java.lang.Object triggerEventMask,
java.lang.Object triggerCols,
java.lang.Object isBefore,
java.lang.Object isRow,
java.lang.Object isEnabled,
java.lang.Object refClause,
java.lang.Object whenClause,
java.lang.Object whenText,
java.lang.Object whenOffset,
java.lang.Object actionNode,
java.lang.Object actionText,
java.lang.Object actionOffset)
throws StandardException
init in interface Nodeinit in class QueryTreeNodetriggerName - name of the triggertableName - name of the table which the trigger is declared upontriggerEventMask - TriggerDescriptor.TRIGGER_EVENT_XXXtriggerCols - columns trigger is to fire upon. Valid
for UPDATE case only.isBefore - is before trigger (false for after)isRow - true for row trigger, false for statementisEnabled - true if enabledrefClause - the referencing clausewhenClause - the WHEN clause treewhenText - the text of the WHEN clausewhenOffset - offset of start of WHEN clauseactionNode - the trigger action treeactionText - the text of the trigger actionactionOffset - offset of start of action clause
StandardException - Thrown on errorpublic java.lang.String statementToString()
statementToString in class StatementNodepublic void printSubNodes(int depth)
printSubNodes in class QueryTreeNodedepth - The depth of this node in the tree
public void bindStatement()
throws StandardException
bindStatement in class StatementNodeStandardException - Thrown on error
public boolean referencesSessionSchema()
throws StandardException
referencesSessionSchema in class QueryTreeNodeStandardException - Thrown on error
private boolean bindReferencesClause(DataDictionary dd)
throws StandardException
StandardExceptionprivate int[] justTheRequiredColumns(int[] columnsArrary)
private void forbidActionsOnGenCols()
throws StandardException
StandardException
private boolean equals(java.lang.String left,
java.lang.String right)
private void checkInvalidTriggerReference(java.lang.String tableName)
throws StandardException
StandardException
private void validateReferencesClause(DataDictionary dd)
throws StandardException
StandardException
public ConstantAction makeConstantAction()
throws StandardException
makeConstantAction in class QueryTreeNodeStandardException - Thrown on failurepublic java.lang.String toString()
toString in class DDLStatementNode
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||