Fix #1368081: First suggestion in #1368081 seems to be working better
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / adapters / DB2AS400Adapter.java
index ff6bf2e..755b768 100644 (file)
@@ -2,14 +2,19 @@ package com.quantum.adapters;
 
 
 public class DB2AS400Adapter extends DatabaseAdapter {
-    public String getShowTableQuery(String qualifier, boolean isDefault) {
-        return "SELECT TABLE_NAME FROM QSYS2.SYSTABLES WHERE table_schema  = '" + 
+       protected DB2AS400Adapter() {
+               super(AdapterFactory.DB2AS400);
+       }
+       public String getShowTableQuery(String qualifier) {
+        return "SELECT table_schema, TABLE_NAME FROM QSYS2.SYSTABLES " +
+                       "WHERE table_schema  = '" + 
                        qualifier.toUpperCase() + 
-                               "' AND TABLE_TYPE IN ('T', 'P') AND SYSTEM_TABLE= 'N'"; //$NON-NLS-1$ //$NON-NLS-2$
+                               "' AND TABLE_TYPE IN ('T', 'P')"; 
     }
-    public String getShowViewQuery(String qualifier, boolean isDefault) {
-        return "SELECT TABLE_NAME FROM QSYS2.SYSTABLES WHERE table_schema  = '" +
+    public String getShowViewQuery(String qualifier) {
+        return "SELECT table_schema, TABLE_NAME FROM QSYS2.SYSTABLES " +
+                       "WHERE table_schema  = '" +
                        qualifier.toUpperCase() +
-                        "' AND TABLE_TYPE IN ('V', 'L') AND SYSTEM_TABLE= 'N'"; //$NON-NLS-1$ //$NON-NLS-2$
+                        "' AND TABLE_TYPE IN ('V', 'L')";
     }
 }