org.h2.test.db

## Class TestTriggersConstraints.DeleteTrigger

- java.lang.Object
- - org.h2.tools.TriggerAdapter
  - - org.h2.test.db.TestTriggersConstraints.DeleteTrigger

All Implemented Interfaces:
  Trigger

Enclosing class:
  TestTriggersConstraints

    public static class TestTriggersConstraints.DeleteTrigger
    extends TriggerAdapter

A trigger that deletes all rows in the test table.

### Field Summary

### Fields inherited from class org.h2.tools.TriggerAdapter

`before, schemaName, tableName, triggerName, type`

### Fields inherited from interface org.h2.api.Trigger

`DELETE, INSERT, SELECT, UPDATE`

### Constructor Summary

Constructors
Constructor and Description
`TestTriggersConstraints.DeleteTrigger()`

### Method Summary

Methods
`void` `fire(java.sql.Connection conn, java.sql.ResultSet oldRow, java.sql.ResultSet newRow)` This method is called for each triggered action by the default fire(Connection conn, Object[] oldRow, Object[] newRow) method.

### Methods inherited from class org.h2.tools.TriggerAdapter

`close, fire, init, remove`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TestTriggersConstraints.DeleteTrigger

    public TestTriggersConstraints.DeleteTrigger()

### Method Detail

#### fire

    public void fire(java.sql.Connection conn,
            java.sql.ResultSet oldRow,
            java.sql.ResultSet newRow)
              throws java.sql.SQLException

Description copied from class: `TriggerAdapter`
This method is called for each triggered action by the default fire(Connection conn, Object[] oldRow, Object[] newRow) method. ResultSet.next does not need to be called (and calling it has no effect; it will always return true).

For "before" triggers, the new values of the new row may be changed using the ResultSet.updateX methods.

Specified by:
  `fire` in class `TriggerAdapter`
Parameters:
  `conn` - a connection to the database
  `oldRow` - the old row, or null if no old row is available (for INSERT)
  `newRow` - the new row, or null if no new row is available (for DELETE)
Throws:
  `java.sql.SQLException` - if the operation must be undone