|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.ext.mysql.MySqlMetadataHandler
public class MySqlMetadataHandler
Special metadata handler for MySQL.
Was introduced to fix "[ 2545095 ] Mysql FEATURE_QUALIFIED_TABLE_NAMES column SQLHelper.matches".
Constructor Summary | |
---|---|
MySqlMetadataHandler()
|
Method Summary | |
---|---|
java.sql.ResultSet |
getColumns(java.sql.DatabaseMetaData databaseMetaData,
java.lang.String schemaName,
java.lang.String tableName)
Returns the result set for an invocation of DatabaseMetaData.getColumns(String, String, String, String) . |
java.lang.String |
getSchema(java.sql.ResultSet resultSet)
Returns the schema name to which the table of the current result set index belongs. |
boolean |
matches(java.sql.ResultSet resultSet,
java.lang.String schema,
java.lang.String table,
boolean caseSensitive)
Checks if the given resultSet matches the given schema and table name. |
boolean |
matches(java.sql.ResultSet columnsResultSet,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String column,
boolean caseSensitive)
Checks if the given resultSet matches the given schema and table name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MySqlMetadataHandler()
Method Detail |
---|
public java.sql.ResultSet getColumns(java.sql.DatabaseMetaData databaseMetaData, java.lang.String schemaName, java.lang.String tableName) throws java.sql.SQLException
IMetadataHandler
DatabaseMetaData.getColumns(String, String, String, String)
.
getColumns
in interface IMetadataHandler
databaseMetaData
- The database metadata to be used for retrieving the columnsschemaName
- The schema nametableName
- The table name
java.sql.SQLException
public boolean matches(java.sql.ResultSet resultSet, java.lang.String schema, java.lang.String table, boolean caseSensitive) throws java.sql.SQLException
IMetadataHandler
resultSet
matches the given schema and table name.
The comparison is case sensitive.
matches
in interface IMetadataHandler
resultSet
- A result set produced via DatabaseMetaData.getColumns(String, String, String, String)
caseSensitive
- Whether or not the comparison should be case sensitive
true
if the column metadata of the given resultSet
matches
the given schema and table parameters.
java.sql.SQLException
IMetadataHandler.matches(ResultSet, String, String, String, String, boolean)
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
IMetadataHandler
resultSet
matches the given schema and table name.
The comparison is case sensitive.
matches
in interface IMetadataHandler
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 sensitive
true
if the column metadata of the given resultSet
matches
the given schema and table parameters.
java.sql.SQLException
public java.lang.String getSchema(java.sql.ResultSet resultSet) throws java.sql.SQLException
IMetadataHandler
getSchema
in interface IMetadataHandler
resultSet
- The result set pointing to a valid record in the database that was returned
by DatabaseMetaData.getTables(String, String, String, String[])
.
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |