Class H2MetadataHandler

All Implemented Interfaces:
IMetadataHandler

public class H2MetadataHandler extends DefaultMetadataHandler
Special metadata handler for H2.

H2 2.x rewrote INFORMATION_SCHEMA to be SQL-standard-compliant, and most of its internal tables now report a JDBC TABLE_TYPE of "BASE TABLE" instead of the "SYSTEM TABLE" type H2 1.x used. Since DatabaseConfig.PROPERTY_TABLE_TYPE defaults to {"TABLE"}, those tables now pass dbunit's default system-table filter and leak into table listings that are not scoped to a single schema (i.e. schemaName is null). This handler excludes the INFORMATION_SCHEMA schema from getTables(java.sql.DatabaseMetaData, java.lang.String, java.lang.String[]) results to restore the pre-2.x behavior.

Since:
3.5.0