Issue Details (XML | Word | Printable)

Key: JDBC-561
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Mark Rotteveel
Reporter: Attila Molnár
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

DatabaseMetaData.getIndexInfo() should use FBDatabaseMetaData.Clause

Created: 30/Oct/18 07:33 AM   Updated: 30/Oct/18 11:27 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

 Description  « Hide
Hi Mark!

DatabaseMetaData .getTables/.getColumns/.getProcedures/.getProcedureColumns uses FBDatabaseMetaData.Clause but .getIndexInfo not. These calls should behave the same, so getIndexInfo also should use FBDatabaseMetaData.Clause.

Thank You!

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 30/Oct/18 10:21 AM
This difference is intentional. The methods getTables, getColumns, getProcedures and getProcedureColumns take a **pattern** parameter for the names, meaning they accept like patterns, while getIndexInfo does not take a pattern, it accepts only the actual name of the table (not a pattern).

Check the javadoc of java.sql.DatabaseMetaData for this difference, specifically:

getIndexInfo: "table - a table name; must match the table name as it is stored in this database"


getTables: "tableNamePattern - a table name pattern; must match the table name as it is stored in the database"

combined with the description of patterns in the class documentation:

"Some DatabaseMetaData methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to null, that argument's criterion will be dropped from the search."

Attila Molnár added a comment - 30/Oct/18 11:27 AM
OK, I can accept this. I did not check the parameter name and documentation, I just assumed that it should be the same.