Class H2Trigger

All Implemented Interfaces:
org.h2.api.Trigger

public class H2Trigger extends AbstractEmbeddedTrigger implements org.h2.api.Trigger
  • Field Details

  • Constructor Details

    • H2Trigger

      public H2Trigger()
  • Method Details

    • init

      public void init(Connection conn, String schemaName, String triggerName, String tableName, boolean before, int type) throws SQLException
      This method is called by the database engine once when initializing the trigger.
      Specified by:
      init in interface org.h2.api.Trigger
      Parameters:
      conn - a connection to the database
      schemaName - the name of the schema
      triggerName - the name of the trigger used in the CREATE TRIGGER statement
      tableName - the name of the table
      before - whether the fire method is called before or after the operation is performed
      type - the operation type: INSERT, UPDATE, or DELETE
      Throws:
      SQLException
    • close

      public void close() throws SQLException
      Specified by:
      close in interface org.h2.api.Trigger
      Throws:
      SQLException
    • remove

      public void remove() throws SQLException
      Specified by:
      remove in interface org.h2.api.Trigger
      Throws:
      SQLException
    • fillVirtualTableSql

      protected String fillVirtualTableSql(String sql, Object[] oldRow, Object[] newRow) throws SQLException
      Overrides:
      fillVirtualTableSql in class AbstractEmbeddedTrigger
      Throws:
      SQLException