Class DB_Trigger
java.lang.Object
org.apache.derby.impl.tools.dblook.DB_Trigger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
createTrigger
(String trigName, String tableName, String whenClause, ResultSet aTrig) Generate DDL for a specific trigger.static void
doTriggers
(Connection conn, boolean supportsWhenClause) Generate the DDL for all triggers in a given database.
-
Field Details
-
TRIGGERNAME
- See Also:
-
SCHEMAID
- See Also:
-
EVENT
- See Also:
-
FIRINGTIME
- See Also:
-
TYPE
- See Also:
-
TABLEID
- See Also:
-
REFERENCEDCOLUMNS
- See Also:
-
TRIGGERDEFINITION
- See Also:
-
REFERENCINGOLD
- See Also:
-
REFERENCINGNEW
- See Also:
-
OLDREFERENCINGNAME
- See Also:
-
NEWREFERENCINGNAME
- See Also:
-
WHENCLAUSETEXT
- See Also:
-
-
Constructor Details
-
DB_Trigger
public DB_Trigger()
-
-
Method Details
-
doTriggers
Generate the DDL for all triggers in a given database.- Parameters:
conn
- Connection to the source database.supportsWhenClause
- Tells whether the database supports the trigger WHEN clause.- Throws:
SQLException
-
createTrigger
private static String createTrigger(String trigName, String tableName, String whenClause, ResultSet aTrig) throws SQLException Generate DDL for a specific trigger.- Parameters:
trigName
- Name of the trigger.tableName
- Name of the table on which the trigger fires.whenClause
- The WHEN clause text (possiblynull
).aTrig
- Information about the trigger.- Returns:
- The DDL for the current trigger is returned as a String.
- Throws:
SQLException
-