## org.h2.fulltext
Class FullText.FullTextTrigger

    java.lang.Object
      org.h2.fulltext.FullText.FullTextTrigger

All Implemented Interfaces:
  CloseListener, Trigger

Enclosing class:
  FullText

    public static class FullText.FullTextTrigger

extends java.lang.Object
implements Trigger, CloseListener

Trigger updates the index when a inserting, updating, or deleting a row.

Field Summary
`protected int[]` `columnTypes`
`protected IndexInfo` `index`
`protected java.sql.PreparedStatement` `prepDeleteMap`
`protected java.sql.PreparedStatement` `prepDeleteRow`
`protected java.sql.PreparedStatement` `prepInsertMap`
`protected java.sql.PreparedStatement` `prepInsertRow`
`protected java.sql.PreparedStatement` `prepInsertWord`
`protected java.sql.PreparedStatement` `prepSelectRow`
`protected FullTextSettings` `setting`

Fields inherited from interface org.h2.api.Trigger
`DELETE, INSERT, SELECT, UPDATE`

Constructor Summary
`FullText.FullTextTrigger()`

Method Summary
`void` `close()` INTERNAL
`protected void` `delete(FullTextSettings setting, java.lang.Object[] row)` Delete a row from the index.
`void` `fire(java.sql.Connection conn, java.lang.Object[] oldRow, java.lang.Object[] newRow)` INTERNAL
`void` `init(java.sql.Connection conn, java.lang.String schemaName, java.lang.String triggerName, java.lang.String tableName, boolean before, int type)` INTERNAL
`protected void` `insert(FullTextSettings setting, java.lang.Object[] row)` Add a row to the index.
`void` `remove()` INTERNAL

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### setting

    protected FullTextSettings setting

### index

    protected IndexInfo index

### columnTypes

    protected int[] columnTypes

### prepInsertWord

    protected java.sql.PreparedStatement prepInsertWord

### prepInsertRow

    protected java.sql.PreparedStatement prepInsertRow

### prepInsertMap

    protected java.sql.PreparedStatement prepInsertMap

### prepDeleteRow

    protected java.sql.PreparedStatement prepDeleteRow

### prepDeleteMap

    protected java.sql.PreparedStatement prepDeleteMap

### prepSelectRow

    protected java.sql.PreparedStatement prepSelectRow

Constructor Detail

### FullText.FullTextTrigger

    public FullText.FullTextTrigger()

Method Detail

### init

    public void init(java.sql.Connection conn,
                     java.lang.String schemaName,
                     java.lang.String triggerName,
                     java.lang.String tableName,
                     boolean before,
                     int type)
              throws java.sql.SQLException

  INTERNAL

  Specified by:
    `init` in interface `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:
    `java.sql.SQLException`

### fire

    public void fire(java.sql.Connection conn,
                     java.lang.Object[] oldRow,
                     java.lang.Object[] newRow)
              throws java.sql.SQLException

  INTERNAL

  Specified by:
    `fire` in interface `Trigger`
  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

### close

    public void close()

  INTERNAL

  Specified by:
    `close` in interface `CloseListener`

### remove

    public void remove()

  INTERNAL

  Specified by:
    `remove` in interface `CloseListener`

### insert

    protected void insert(FullTextSettings setting,
                          java.lang.Object[] row)
                   throws java.sql.SQLException

  Add a row to the index.

  Parameters:
    `setting` - the setting
    `row` - the row
  Throws:
    `java.sql.SQLException`

### delete

    protected void delete(FullTextSettings setting,
                          java.lang.Object[] row)
                   throws java.sql.SQLException

  Delete a row from the index.

  Parameters:
    `setting` - the setting
    `row` - the row
  Throws:
    `java.sql.SQLException`