| Modifier and Type | Field and Description |
|---|---|
| private StatementNode | |
| private String | |
| private final ArrayList | actionTransformations
A list that describes how the original SQL text of the trigger action statement was modified when transition tables and transition variables were replaced by VTI calls. |
| private SchemaDescriptor | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private String | |
| private static final 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 | |
| private String | |
| private String | |
| private String | |
| private ProviderInfo[] | |
| private List | |
| private int[] | |
| private int[] | |
| private TableName | |
| private ResultColumnList | |
| private int | |
| private TableName | |
| private SchemaDescriptor | |
| private TableDescriptor | |
| private ValueNode | |
| private final ArrayList | whenClauseTransformations
Structure that has the same shape as |
| private String |
| Access | Constructor and Description |
|---|---|
| pack-priv | CreateTriggerNode(TableName
name of the trigger triggerName, TableName name of the table which the trigger is declared upon tableName, int TriggerDescriptor.TRIGGER_EVENT_XXX triggerEventMask, ResultColumnList columns trigger is to fire upon. Valid
for UPDATE case only. triggerCols, boolean is before trigger (false for after) isBefore, boolean true for row trigger, false for statement isRow, boolean true if enabled isEnabled, List<TriggerReferencingStruct> the referencing clause refClause, ValueNode the WHEN clause tree whenClause, String the text of the WHEN clause whenText, StatementNode the trigger action tree actionNode, String the text of the trigger action actionText, ContextManager context manager cm)Constructor for a CreateTriggerNode |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | acceptChildren(Visitor
the visitor v)Overrides org. Accept a visitor on all child nodes. |
| private boolean | |
| public void | bindStatement()
Overrides org. Bind this CreateTriggerNode. |
| private void | |
| private boolean | |
| private void | |
| private static Integer | Returns: the position in the original text, ornull if there
is no corresponding position in the original text (for example if
it points to a token that was added to the transformed text and
does not exist in the original text)a data structure that describes the relationship
between positions in the original and the transformed text replacements, int the position to translate transformedPosition)Translate a position from the transformed trigger text
( |
| private SortedSet | Returns: a sorted set ofFromBaseTables that represent
transition tablesthe node in which to search for transition tables node)Get all transition tables referenced by a given node, sorted in the order in which they appear in the SQL text. |
| private boolean | Returns: true if fbt represents either the old or
the new transition table, false otherwisethe table to check fbt)Check if a table represents one of the transition tables. |
| private int[] | |
| public ConstantAction | makeConstantAction()
Overrides org. Create the Constant information that will drive the guts of Execution. |
| pack-priv void | printSubNodes(int
The depth of this node in the tree depth)Overrides org. Prints the sub-nodes of this object. |
| private void | qualifyNames(SortedSet<TableName>
all the TableName nodes found in the triggered
SQL statement actionNames, SortedSet<TableName> all the Table Name nodes found in the WHEN clause whenNames)Make sure all references to SQL schema objects (such as tables and functions) in the SQL fragments that will be stored in the SPS and in the trigger descriptor, are fully qualified with a schema name. |
| private void | qualifyNames(QueryTreeNode
the query tree node for the transformed version of the
SQL text, in a bound state node, SortedSet<TableName> all the TableName nodes in the transformed text,
in the order in which they appear in the SQL text tableNames, String the original SQL text originalText, String the transformed SQL text (with VTI calls for
transition tables or transition variables) transformedText, List<int[]> a data structure that describes how replacements, StringBuilder originalText was transformed into transformedTextwhere to store the normalized version of the
original text newOriginal, StringBuilder where to store the normalized version of the
transformed text newTransformed)Qualify all names SQL object names in original and transformed SQL text for an action or a WHEN clause. |
| public boolean | Returns: true if references SESSION schema tables, else falseOverrides org. Return true if the node references SESSION schema tables (temporary or permanent) |
| pack-priv String | statementToString()
Implements abstract org.
|
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| private String | Returns: internal syntax for accessing before or after image of the changed rowsthe syntax tree of the WHEN clause or the triggered
SQL statement node, String the original text of the WHEN clause or the
triggered SQL statement originalText, List<int[]> list that will be populated with int arrays that
describe how the original text was transformed. The int arrays
contain the begin (inclusive) and end (exclusive) positions of the
original text that got replaced and of the replacement text, so that
positions in the transformed text can be mapped to positions in the
original text. replacements)Transform the WHEN clause or the triggered SQL statement of a statement trigger from its original shape to internal syntax where references to transition tables are replaced with VTIs that return the before or after image of the changed rows. |
| private void |
| actionNode | back to summary |
|---|---|
| private StatementNode actionNode | |
| actionText | back to summary |
|---|---|
| private String actionText | |
| actionTransformations | back to summary |
|---|---|
| private final ArrayList<int[]> actionTransformations
A list that describes how the original SQL text of the trigger action
statement was modified when transition tables and transition variables
were replaced by VTI calls. Each element in the list contains four
integers describing positions where modifications have happened. The
first two integers are begin and end positions of a transition table
or transition variable in Begin positions are inclusive and end positions are exclusive. | |
| compSchemaDescriptor | back to summary |
|---|---|
| private SchemaDescriptor compSchemaDescriptor | |
| isBefore | back to summary |
|---|---|
| private boolean isBefore | |
| isEnabled | back to summary |
|---|---|
| private boolean isEnabled | |
| isRow | back to summary |
|---|---|
| private boolean isRow | |
| newTableInReferencingClause | back to summary |
|---|---|
| private boolean newTableInReferencingClause | |
| newTableName | back to summary |
|---|---|
| private String newTableName | |
| OFFSET_COMPARATOR | back to summary |
|---|---|
| private static final Comparator<FromBaseTable> OFFSET_COMPARATOR Comparator that can be used for sorting lists of FromBaseTables on the position they have in the SQL query string. | |
| oldTableInReferencingClause | back to summary |
|---|---|
| private boolean oldTableInReferencingClause | |
| oldTableName | back to summary |
|---|---|
| private String oldTableName | |
| originalActionText | back to summary |
|---|---|
| private String originalActionText | |
| originalWhenText | back to summary |
|---|---|
| private String originalWhenText | |
| providerInfo | back to summary |
|---|---|
| private ProviderInfo[] providerInfo | |
| refClause | back to summary |
|---|---|
| private List<TriggerReferencingStruct> refClause | |
| referencedColInts | back to summary |
|---|---|
| private int[] referencedColInts | |
| referencedColsInTriggerAction | back to summary |
|---|---|
| private int[] referencedColsInTriggerAction | |
| tableName | back to summary |
|---|---|
| private TableName tableName Hides org. | |
| triggerCols | back to summary |
|---|---|
| private ResultColumnList triggerCols | |
| triggerEventMask | back to summary |
|---|---|
| private int triggerEventMask | |
| triggerName | back to summary |
|---|---|
| private TableName triggerName | |
| triggerSchemaDescriptor | back to summary |
|---|---|
| private SchemaDescriptor triggerSchemaDescriptor | |
| triggerTableDescriptor | back to summary |
|---|---|
| private TableDescriptor triggerTableDescriptor | |
| whenClause | back to summary |
|---|---|
| private ValueNode whenClause | |
| whenClauseTransformations | back to summary |
|---|---|
| private final ArrayList<int[]> whenClauseTransformations Structure that has the same shape as | |
| whenText | back to summary |
|---|---|
| private String whenText | |
| CreateTriggerNode | back to summary |
|---|---|
| pack-priv CreateTriggerNode(TableName triggerName, TableName tableName, int triggerEventMask, ResultColumnList triggerCols, boolean isBefore, boolean isRow, boolean isEnabled, List<TriggerReferencingStruct> refClause, ValueNode whenClause, String whenText, StatementNode actionNode, String actionText, ContextManager cm) throws StandardException Constructor for a CreateTriggerNode
| |
| acceptChildren | back to summary |
|---|---|
| pack-priv void acceptChildren(Visitor v) throws StandardException Overrides org. Doc from org. Accept a visitor on all child nodes. All sub-classes that add fields
that should be visited, should override this method and call
| |
| bindReferencesClause | back to summary |
|---|---|
| private boolean bindReferencesClause(DataDictionary dd) throws StandardException | |
| bindStatement | back to summary |
|---|---|
| public void bindStatement() throws StandardException Overrides org. Bind this CreateTriggerNode. This means doing any static error checking that can be done before actually creating the table.
| |
| checkInvalidTriggerReference | back to summary |
|---|---|
| private void checkInvalidTriggerReference(String tableName) throws StandardException | |
| equals | back to summary |
|---|---|
| private boolean equals(String left, String right) | |
| forbidActionsOnGenCols | back to summary |
|---|---|
| private void forbidActionsOnGenCols() throws StandardException | |
| getOriginalPosition | back to summary |
|---|---|
| private static Integer getOriginalPosition(List<int[]> replacements, int transformedPosition) Translate a position from the transformed trigger text
(
| |
| getTransitionTables | back to summary |
|---|---|
| private SortedSet Get all transition tables referenced by a given node, sorted in the order in which they appear in the SQL text.
| |
| isTransitionTable | back to summary |
|---|---|
| private boolean isTransitionTable(FromBaseTable fbt) Check if a table represents one of the transition tables.
| |
| justTheRequiredColumns | back to summary |
|---|---|
| private int[] justTheRequiredColumns(int[] columnsArrary) | |
| makeConstantAction | back to summary |
|---|---|
| public ConstantAction makeConstantAction() throws StandardException Overrides org. Create the Constant information that will drive the guts of Execution.
| |
| printSubNodes | back to summary |
|---|---|
| pack-priv void printSubNodes(int depth) Overrides org. Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.
| |
| qualifyNames | back to summary |
|---|---|
| private void qualifyNames(SortedSet<TableName> actionNames, SortedSet<TableName> whenNames) throws StandardException Make sure all references to SQL schema objects (such as tables and functions) in the SQL fragments that will be stored in the SPS and in the trigger descriptor, are fully qualified with a schema name. | |
| qualifyNames | back to summary |
|---|---|
| private void qualifyNames(QueryTreeNode node, SortedSet<TableName> tableNames, String originalText, String transformedText, List<int[]> replacements, StringBuilder newOriginal, StringBuilder newTransformed) throws StandardException Qualify all names SQL object names in original and transformed SQL text for an action or a WHEN clause.
| |
| referencesSessionSchema | back to summary |
|---|---|
| public boolean referencesSessionSchema() throws StandardException Overrides org. Return true if the node references SESSION schema tables (temporary or permanent)
| |
| statementToString | back to summary |
|---|---|
| pack-priv String statementToString() Implements abstract org. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing. | |
| transformStatementTriggerText | back to summary |
|---|---|
| private String transformStatementTriggerText(QueryTreeNode node, String originalText, List<int[]> replacements) throws StandardException Transform the WHEN clause or the triggered SQL statement of a statement trigger from its original shape to internal syntax where references to transition tables are replaced with VTIs that return the before or after image of the changed rows.
| |
| validateReferencesClause | back to summary |
|---|---|
| private void validateReferencesClause(DataDictionary dd) throws StandardException | |