public class Db2MetadataHandler extends DefaultMetadataHandler
DefaultMetadataHandler
fails with a RuntimeException.Constructor and Description |
---|
Db2MetadataHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(java.sql.ResultSet columnsResultSet,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String column,
boolean caseSensitive)
This method is overridden since - at least with DB2 driver db2jcc-9.5.jar - there is a
problem that the
DatabaseMetaData does not return the same values for catalog and schema
like the columns ResultSet does. |
getColumns, getPrimaryKeys, getSchema, getTables, matches, tableExists
public boolean matches(java.sql.ResultSet columnsResultSet, java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column, boolean caseSensitive) throws java.sql.SQLException
DatabaseMetaData
does not return the same values for catalog and schema
like the columns ResultSet
does. The debugging constellation is as follows
catalog="BLA", catalogName=This problem is taken into account by this metadata handler. Checks if the givenschema="BLA", schemaName="BLA"
resultSet
matches the given schema and table name.
The comparison is case sensitive.matches
in interface IMetadataHandler
matches
in class DefaultMetadataHandler
columnsResultSet
- A result set produced via DatabaseMetaData.getColumns(String, String, String, String)
catalog
- The name of the catalog to check. If null
it is ignored in the comparisonschema
- The name of the schema to check. If null
it is ignored in the comparisontable
- The name of the table to check. If null
it is ignored in the comparisoncolumn
- The name of the column to check. If null
it is ignored in the comparisoncaseSensitive
- Whether or not the comparison should be case sensitivetrue
if the column metadata of the given resultSet
matches
the given schema and table parameters.java.sql.SQLException
DefaultMetadataHandler.matches(java.sql.ResultSet, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
Copyright © 2002-2021. All Rights Reserved.