Author: shawkins
Date: 2010-07-06 14:36:27 -0400 (Tue, 06 Jul 2010)
New Revision: 2328
Modified:
trunk/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetCatalogs.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testCatalogs.expected
Log:
TEIID-1141 adding support for getCatalogs
Modified: trunk/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java 2010-07-01
14:26:20 UTC (rev 2327)
+++ trunk/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java 2010-07-06
18:36:27 UTC (rev 2328)
@@ -433,7 +433,8 @@
public ResultSet getCatalogs() throws SQLException {
// list containing records/rows in the ResultSet
- List records = new ArrayList (0);
+ List<List<String>> records = new ArrayList<List<String>>
(1);
+ records.add(Arrays.asList(this.driverConnection.getCatalog()));
/***********************************************************************
* Hardcoding JDBC column names for the columns returned in results object
Modified:
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetCatalogs.expected
===================================================================
---
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetCatalogs.expected 2010-07-01
14:26:20 UTC (rev 2327)
+++
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetCatalogs.expected 2010-07-06
18:36:27 UTC (rev 2328)
@@ -1,5 +1,6 @@
string
TABLE_CAT
-Row Count : 0
+QT_Ora9DS
+Row Count : 1
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel
getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision
getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable
isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 QT_Ora9DS java.lang.String <null>
string <null> <null> 4000 4000
0 false false false false 1
true false false false
Modified:
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testCatalogs.expected
===================================================================
---
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testCatalogs.expected 2010-07-01
14:26:20 UTC (rev 2327)
+++
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testCatalogs.expected 2010-07-06
18:36:27 UTC (rev 2328)
@@ -1,5 +1,6 @@
string
TABLE_CAT
-Row Count : 0
+PartsSupplier
+Row Count : 1
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel
getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision
getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable
isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 PartsSupplier java.lang.String <null>
string <null> <null> 4000 4000
0 false false false false 1
true false false false