The JDBC API does support a call to DatabaseMetaData.getSchemas() which takes a DB name as an input parameter. We'll make an enhancement to ADS to invoke this method so that we can display schemas per DB for Generic JDBC connection.
The API call we make today: http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getSchemas()
The API call w/ input parameters: http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getSchemas(java.lang.String,%20java.lang.String)
In my experimentation, I noticed that not all JDBC driver vendors implement the getSchemas(String, String) call. So if this method throws an exception, we should fallback to getSchemas() w/ no input parameters.
The term "Catalog" refers to the DB name.
33 KB
95 KB
279 KB
Enhanced the SchemasNode code to call getSchemas(db, null). If the call fails, it'll fall back to call getSchemas().
FIxed the SchemasNode code to return the schemas that are specific to the database node only when processing the result set from getSchemas(). It was returning the schemas for all the databases.
@qa: be sure to include SQL Server in your testing.
@qa: be sure to include SQL Server in your testing.
Build: ADS 16.0.3-11
Database: Google BigQuery
Connection: Generic JDBC
In ADS schema tree node, for some Project, ADS doesn't list proper dataset under Project, instead it shows 'DEFAULT' as dataset, and lists all tables of different datasets under 'DEFAULT' schema.
Build: ADS 16.0.3-11
Database: Google BigQuery
Connection: Generic JDBC
In ADS schema tree node, for some Project, ADS doesn't list proper dataset under Project, instead it shows 'DEFAULT' as dataset, and lists all tables of different datasets under 'DEFAULT' schema.
The code changes for this fix are causing a NullPointerException when the database (catalog) is null. The exception happens in :
com.aquafold.datastudio.schematree.generic.GenSchemasNode.getChildrenList(java.util.ArrayList).
java.lang.NullPointerException
at \\...\\ .\\हिñçêČάй語简�?한\\.E͌ꀐꉈꋽ float else.a(Unknown Source)
at com.common.ui.tree.z⡟⠸ꈍꑝ private native.cFD(Unknown Source)
at com.common.ui.tree.z⡟⠸ꈍꑝ private native.rebuild(Unknown Source)
at com.common.ui.tree.Oᝈᚵ᠑ꀏ$5.treeWillExpand(Unknown Source)
at javax.swing.JTree.fireTreeWillExpand(Unknown Source)
I don't think we have any database in house where the database (catalog) is null, but it looks like Cache does.
Driver Name: InterSystems Cache JDBC
Driver Version: 2009.1.5.901
Driver Class: com.intersys.jdbc.CacheDriver
The exception occurs in 16.0, but not in 15.0.
Lets add some Null checks for _catalogName to handle the scenario and have customer test out 16.0.
The code changes for this fix are causing a NullPointerException when the database (catalog) is null. The exception happens in :
com.aquafold.datastudio.schematree.generic.GenSchemasNode.getChildrenList(java.util.ArrayList).
java.lang.NullPointerException
at \\...\\ .\\हिñçêČάй語简�?한\\.E͌ꀐꉈꋽ float else.a(Unknown Source)
at com.common.ui.tree.z⡟⠸ꈍꑝ private native.cFD(Unknown Source)
at com.common.ui.tree.z⡟⠸ꈍꑝ private native.rebuild(Unknown Source)
at com.common.ui.tree.Oᝈᚵ᠑ꀏ$5.treeWillExpand(Unknown Source)
at javax.swing.JTree.fireTreeWillExpand(Unknown Source)
I don't think we have any database in house where the database (catalog) is null, but it looks like Cache does.
Driver Name: InterSystems Cache JDBC
Driver Version: 2009.1.5.901
Driver Class: com.intersys.jdbc.CacheDriver
The exception occurs in 16.0, but not in 15.0.
Lets add some Null checks for _catalogName to handle the scenario and have customer test out 16.0.
Issue #13212 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 16.0.10-5 |
No time estimate |
Enhanced the SchemasNode code to call getSchemas(db, null). If the call fails, it'll fall back to call getSchemas().
FIxed the SchemasNode code to return the schemas that are specific to the database node only when processing the result set from getSchemas(). It was returning the schemas for all the databases.