Author: shawkins
Date: 2009-07-07 17:36:05 -0400 (Tue, 07 Jul 2009)
New Revision: 1103
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected
Log:
TEIID-626 getTables query should filter system tables if only asking for tables.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-07-07
21:25:59 UTC (rev 1102)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-07-07
21:36:05 UTC (rev 1103)
@@ -1910,9 +1910,9 @@
for(int i=0; i < types.length; i++) {
if (types[i] != null && types[i].length() > 0) {
if (i > 0) {
- typesString.append(" OR UCASE(Type) LIKE ?");
//$NON-NLS-1$
+ typesString.append(" OR CASE WHEN IsSystem = 'true'
and UCASE(Type) = 'TABLE' THEN 'SYSTEM TABLE' ELSE UCASE(Type) END LIKE
?"); //$NON-NLS-1$
} else {
- typesString.append("(UCASE(Type) LIKE ?");
//$NON-NLS-1$
+ typesString.append("(CASE WHEN IsSystem = 'true' and
UCASE(Type) = 'TABLE' THEN 'SYSTEM TABLE' ELSE UCASE(Type) END LIKE
?"); //$NON-NLS-1$
}
}
}
Modified:
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected
===================================================================
---
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected 2009-07-07
21:25:59 UTC (rev 1102)
+++
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected 2009-07-07
21:36:05 UTC (rev 1103)
@@ -1,30 +1,5 @@
string string
string
string
string string
string
string
string string
boolean
TABLE_CAT TABLE_SCHEM
TABLE_NAME
TABLE_TYPE
REMARKS TYPE_CAT
TYPE_SCHEM
TYPE_NAME
SELF_REFERENCING_COL_NAME REF_GENERATION
ISPHYSICAL
-<null> QT_Ora9DS
System.DataTypeElementProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.DataTypeElements
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.DataTypeProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.DataTypes
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ElementProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Elements
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.GroupProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Groups
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.JDBC.ReferenceKeyColumns
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.KeyElements
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.KeyProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Keys
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ModelProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Models
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_COLUMNS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_FKEYS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_PROC
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_PROCCOLUMNS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_STATISTICS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_TABLES
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_TYPES
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ProcedureParams
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ProcedureProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Procedures
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.VirtualDatabases
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
<null> QT_Ora9DS
BQT1.HugeA
TABLE
<null> <null>
<null>
<null>
<null>
<null> true
<null> QT_Ora9DS
BQT1.HugeB
TABLE
<null> <null>
<null>
<null>
<null>
<null> true
<null> QT_Ora9DS
BQT1.LargeA
TABLE
<null> <null>
<null>
<null>
<null>
<null> true
@@ -74,7 +49,7 @@
<null> QT_Ora9DS
VQT.Union.U9
TABLE
<null> <null>
<null>
<null>
<null>
<null> false
<null> QT_Ora9DS
XQT.xqtData
TABLE
<null> <null>
<null>
<null>
<null>
<null> false
<null> QT_Ora9DS
XQT.xqtFullData
TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-Row Count : 74
+Row Count : 49
getColumnName getColumnType getCatalogName getColumnClassName
getColumnLabel getColumnTypeName getSchemaName getTableName
getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency
isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 <null> java.lang.String
TABLE_CAT string QT_Ora9DS <null>
4000 4000 0 false false false
true 1 false true true true
TABLE_SCHEM 12 <null> java.lang.String
TABLE_SCHEM string QT_Ora9DS System.VirtualDatabases 255
255 0 false true false
false 0 true true false false
Modified:
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected
===================================================================
---
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected 2009-07-07
21:25:59 UTC (rev 1102)
+++
trunk/test-integration/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected 2009-07-07
21:36:05 UTC (rev 1103)
@@ -1,30 +1,5 @@
string string
string
string
string string
string
string
string string
boolean
TABLE_CAT TABLE_SCHEM
TABLE_NAME
TABLE_TYPE
REMARKS TYPE_CAT
TYPE_SCHEM
TYPE_NAME
SELF_REFERENCING_COL_NAME REF_GENERATION
ISPHYSICAL
-<null> QT_Ora9DS
System.DataTypeElementProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.DataTypeElements
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.DataTypeProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.DataTypes
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ElementProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Elements
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.GroupProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Groups
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.JDBC.ReferenceKeyColumns
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.KeyElements
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.KeyProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Keys
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ModelProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Models
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_COLUMNS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_FKEYS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_PROC
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_PROCCOLUMNS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_STATISTICS
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_TABLES
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ODBC.OA_TYPES
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ProcedureParams
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.ProcedureProperties
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.Procedures
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-<null> QT_Ora9DS
System.VirtualDatabases
SYSTEM TABLE
<null> <null>
<null>
<null>
<null>
<null> false
<null> QT_Ora9DS
BQT1.HugeA
TABLE
<null> <null>
<null>
<null>
<null>
<null> true
<null> QT_Ora9DS
BQT1.HugeB
TABLE
<null> <null>
<null>
<null>
<null>
<null> true
<null> QT_Ora9DS
BQT1.LargeA
TABLE
<null> <null>
<null>
<null>
<null>
<null> true
@@ -74,7 +49,7 @@
<null> QT_Ora9DS
VQT.Union.U9
TABLE
<null> <null>
<null>
<null>
<null>
<null> false
<null> QT_Ora9DS
XQT.xqtData
TABLE
<null> <null>
<null>
<null>
<null>
<null> false
<null> QT_Ora9DS
XQT.xqtFullData
TABLE
<null> <null>
<null>
<null>
<null>
<null> false
-Row Count : 74
+Row Count : 49
getColumnName getColumnType getCatalogName getColumnClassName
getColumnLabel getColumnTypeName getSchemaName getTableName
getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency
isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 <null> java.lang.String
TABLE_CAT string QT_Ora9DS <null>
4000 4000 0 false false false
true 1 false true true true
TABLE_SCHEM 12 <null> java.lang.String
TABLE_SCHEM string QT_Ora9DS System.VirtualDatabases 255
255 0 false true false
false 0 true true false false
Show replies by date