[teiid-commits] teiid SVN: r916 - trunk/client-jdbc/src/main/java/com/metamatrix/jdbc.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue May 12 15:44:31 EDT 2009


Author: li.liang
Date: 2009-05-12 15:44:31 -0400 (Tue, 12 May 2009)
New Revision: 916

Modified:
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
Log:
TEIID-522 Return values when catalog is an empty string.

Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java	2009-05-12 19:36:13 UTC (rev 915)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java	2009-05-12 19:44:31 UTC (rev 916)
@@ -602,7 +602,7 @@
 
         // Since catelog is allways null with MM, if nay supplied send empty
         //result set
-        if (catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyColumnsResultSet();
         }
         
@@ -934,7 +934,7 @@
      * @throws SQLException if there is an error obtaining server results
      */
     public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
-        if (catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyExportedKeys();
         }
         
@@ -1008,7 +1008,7 @@
      * @throws SQLException if there is an error obtaining server results
      */
     public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {
-        if (catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyImportedKeys();
         }
         
@@ -1061,7 +1061,7 @@
      * @throws SQLException if catalog/schema info does not match for this connection.
      */
     public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {
-        if(catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyIndexInfo();
         }
         
@@ -1356,8 +1356,7 @@
      * @throws SQLException if there is an error obtaining metamatrix results.
      */
     public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
-        
-        if (catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyPrimaryKeys();
         }
         
@@ -1448,7 +1447,7 @@
      * @throws SQLException if there is an error obtaining metamatrix results.
      */
     public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException {
-        if(catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyProcedureColumns();
         }
         if (schemaPattern == null) {
@@ -1556,7 +1555,7 @@
      * @throws SQLException if there is an error obtaining metamatrix results.
      */
     public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {
-        if (catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyProcedures();
         }
         if (schemaPattern == null) {
@@ -1885,8 +1884,7 @@
      * @throws SQLException if there is an error obtaining metamatrix results.
      */
     public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException {
-
-        if (catalog != null) {
+        if ((catalog != null) && (catalog.trim().length() > 0)) {
             return emptyTablesResultSet();
         }
         




More information about the teiid-commits mailing list