I have numerous triggers on my database and i can see the data being i'm
entering being output on the console using the code below in the fire
function. The problem is i cant see which table the trigger was fired
against.
Is there something obvious im missing.....? Id like to eventually output
the table name with the data entered so i can see which tables are being
updated.
/**
* This method is called for each triggered action.
*
* @param conn a connection to the database
* @param oldRow the old row, or null if no old row is available
(for
* INSERT)
* @param newRow the new row, or null if no new row is available
(for
* DELETE)
* @throws SQLException if the operation must be undone
*/
@Override
public void fire(Connection conn,
Object[] oldRow, Object[] newRow)
throws SQLException {
BigDecimal diff = null;
if (newRow != null) {
for (int i =0; i < newRow.length; i++) {
if (newRow[i] != null) {
System.out.println("Col !");
System.out.println(newRow[i].toString());
}
}
}
}
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.