Class FullTextLucene.FullTextTrigger
java.lang.Object
org.h2.fulltext.FullTextLucene.FullTextTrigger
- All Implemented Interfaces:
Trigger
- Enclosing class:
FullTextLucene
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]private int[]private final org.apache.lucene.document.FieldTypeprivate FullTextLucene.IndexAccessprivate int[]private Stringprivate int[]private Stringprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()INTERNAL(package private) voidCommit all changes to the Lucene index.private voidDelete a row from the index.voidfire(Connection conn, Object[] oldRow, Object[] newRow) INTERNALprivate Stringvoidinit(Connection conn, String schemaName, String triggerName, String tableName, boolean before, int type) INTERNAL(package private) voidAdd a row to the index.
-
Field Details
-
schema
-
table
-
keys
private int[] keys -
indexColumns
private int[] indexColumns -
columns
-
columnTypes
private int[] columnTypes -
indexPath
-
indexAccess
-
DOC_ID_FIELD_TYPE
private final org.apache.lucene.document.FieldType DOC_ID_FIELD_TYPE
-
-
Constructor Details
-
FullTextTrigger
public FullTextTrigger()
-
-
Method Details
-
init
public void init(Connection conn, String schemaName, String triggerName, String tableName, boolean before, int type) throws SQLException INTERNAL- Specified by:
initin interfaceTrigger- Parameters:
conn- a connection to the database (a system connection)schemaName- the name of the schematriggerName- the name of the trigger used in the CREATE TRIGGER statementtableName- the name of the tablebefore- whether the fire method is called before or after the operation is performedtype- the operation type: INSERT, UPDATE, DELETE, SELECT, or a combination (this parameter is a bit field)- Throws:
SQLException- on SQL exception- See Also:
-
fire
INTERNAL- Specified by:
firein interfaceTrigger- Parameters:
conn- a connection to the databaseoldRow- 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:
SQLException- if the operation must be undone- See Also:
-
close
INTERNAL- Specified by:
closein interfaceTrigger- Throws:
SQLException- on SQL exception
-
commitIndex
Commit all changes to the Lucene index.- Throws:
SQLException- on failure
-
insert
Add a row to the index.- Parameters:
row- the rowcommitIndex- whether to commit the changes to the Lucene index- Throws:
SQLException- on failure
-
delete
Delete a row from the index.- Parameters:
row- the rowcommitIndex- whether to commit the changes to the Lucene index- Throws:
SQLException- on failure
-
getQuery
- Throws:
SQLException
-