The H2 plugin adds H2-specific functionality to the SQuirreL SQL Client. Read access is required to the following system views in order for this additional functionality to work correctly:
Indexes and Views are shown in the object tree and have a "Source" tab which displays the source of the selected object and a "Details" tab which gives H2-specific information about the object. Sequences and Indexes are also shown in the object tree and have a details tab giving H2-specific information about them.
The information provided by the details tab for indexes is derived by the following query:
SELECT TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME, NON_UNIQUE,ORDINAL_POSITION,COLUMN_NAME, CARDINALITY,PRIMARY_KEY,INDEX_TYPE_NAME, IS_GENERATED,INDEX_TYPE,ASC_OR_DESC,PAGES, FILTER_CONDITION,REMARKS FROM INFORMATION_SCHEMA.INDEXES WHERE TABLE_SCHEMA = ? AND INDEX_NAME = ?
The information provided by the source tab for indexes is derived by the following query:
select 'create '||index_type_name||' '||index_name||' ON '||table_name||'('||column_name||')' from INFORMATION_SCHEMA.INDEXES where table_schema = ? and index_name = ?
The information in the details tab for a sequence is derived from the following query:
SELECT SEQUENCE_CATALOG,SEQUENCE_SCHEMA, CURRENT_VALUE,INCREMENT,IS_GENERATED,REMARKS FROM INFORMATION_SCHEMA.SEQUENCES WHERE SEQUENCE_SCHEMA = ? AND SEQUENCE_NAME = ?
The information in the details tab for a trigger is derived from the following query:
SELECT TRIGGER_CATALOG,TRIGGER_SCHEMA,TRIGGER_NAME, TRIGGER_TYPE,TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME, BEFORE,JAVA_CLASS,QUEUE_SIZE,NO_WAIT,REMARKS,SQL FROM INFORMATION_SCHEMA.TRIGGERS WHERE TABLE_SCHEMA = ? AND TRIGGER_NAME = ?
The source code for views is derived from the following query:
select view_definition from information_schema.views where table_schema = ? and table_name = ?