Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.5.4
Description
Currently the table parameter is mandatory:
I think it would be useful to return the exported keys for all tables if the parameter is null. We could also allow a search pattern (using LIKE):
// get the exported keys for the table named crm_sales
|
dbmd.getExportedKeys("testj", null, "crm_sales"); |
|
// get the exported keys for all tables starting with "crm_"
|
dbmd.getExportedKeys("testj", null, "crm_%"); |
|
// get the exported keys for all tables
|
dbmd.getExportedKeys("testj", null, null); |
As a workaround it's possible to send N queries to retrieve the exported keys for N tables but it's detrimental (performance wise).
We might need to do the same for MariaDbDatabaseMetaData#getImportedKeys to be consistent.
Interestingly, it's already possible to retrieve the primary keys for all tables using MariaDbDatabaseMetaData#getPrimaryKeys.