[teiid-commits] teiid SVN: r1541 - in trunk: client-jdbc/src/main/java/com/metamatrix/jdbc and 3 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Sat Oct 24 22:09:27 EDT 2009


Author: shawkins
Date: 2009-10-24 22:09:27 -0400 (Sat, 24 Oct 2009)
New Revision: 1541

Modified:
   trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
   trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java
   trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java
   trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml
   trunk/pom.xml
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic.  The index connector has been removed and the system virtual views promoted to physical tables.  some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.


Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java	2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java	2009-10-25 02:09:27 UTC (rev 1541)
@@ -123,7 +123,6 @@
     
     final private static class RUNTIME_MODEL{
         public final static String VIRTUAL_MODEL_NAME = "System"; //$NON-NLS-1$
-        public final static String JDBC_SYSTEM_MODEL_NAME = "System.JDBC"; //$NON-NLS-1$
     }
 
     private static final String TYPE_MAPPING;
@@ -187,7 +186,7 @@
     private final static String QUERY_REFERENCE_KEYS =
       new StringBuffer("SELECT PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, PKCOLUMN_NAME, FKTABLE_CAT, FKTABLE_SCHEM") //$NON-NLS-1$
         .append(", FKTABLE_NAME, FKCOLUMN_NAME, KEY_SEQ, UPDATE_RULE, DELETE_RULE, FK_NAME, PK_NAME, DEFERRABILITY FROM ") //$NON-NLS-1$
-        .append(RUNTIME_MODEL.JDBC_SYSTEM_MODEL_NAME).append(".ReferenceKeyColumns").toString(); //$NON-NLS-1$
+        .append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".ReferenceKeyColumns").toString(); //$NON-NLS-1$
     
     private final static String QUERY_CROSS_REFERENCES = new StringBuffer(QUERY_REFERENCE_KEYS)
     	.append(",").append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".VirtualDatabases v WHERE UCASE(v.Name)").append(LIKE_ESCAPE).append("AND UCASE(v.Name) LIKE ?") //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
@@ -227,12 +226,12 @@
 
     private static final String QUERY_INDEX_INFO =
       new StringBuffer("SELECT NULL AS TABLE_CAT, v.Name AS TABLE_SCHEM, GroupFullName AS TABLE_NAME") //$NON-NLS-1$
-        .append(", convert(0, boolean) AS NON_UNIQUE, NULL AS INDEX_QUALIFIER, KeyName AS INDEX_NAME") //$NON-NLS-1$
+        .append(", case when KeyType = 'Index' then TRUE else FALSE end AS NON_UNIQUE, NULL AS INDEX_QUALIFIER, KeyName AS INDEX_NAME") //$NON-NLS-1$
         .append(", 0 AS TYPE, convert(Position, short) AS ORDINAL_POSITION, k.Name AS COLUMN_NAME") //$NON-NLS-1$
         .append(", NULL AS ASC_OR_DESC, 0 AS CARDINALITY, 1 AS PAGES, NULL AS FILTER_CONDITION") //$NON-NLS-1$
         .append(" FROM ").append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".KeyElements k CROSS JOIN ") //$NON-NLS-1$ //$NON-NLS-2$
         .append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".VirtualDatabases v")  //$NON-NLS-1$
-        .append(" WHERE UCASE(v.Name)").append(LIKE_ESCAPE).append("AND KeyType LIKE 'Index' AND UCASE(GroupFullName) LIKE ?") //$NON-NLS-1$//$NON-NLS-2$
+        .append(" WHERE UCASE(v.Name)").append(LIKE_ESCAPE).append("AND KeyType IN ('Index', ?) AND UCASE(GroupFullName) LIKE ?") //$NON-NLS-1$//$NON-NLS-2$
         .append(" ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION").toString(); //$NON-NLS-1$
     
     private static final String QUERY_MODELS =
@@ -1074,7 +1073,8 @@
             prepareQuery = driverConnection.prepareStatement(QUERY_INDEX_INFO); 
 
             prepareQuery.setObject(1, schema.toUpperCase());
-            prepareQuery.setObject(2, table.toUpperCase());
+            prepareQuery.setObject(2, unique?null:"NonUnique"); //$NON-NLS-1$
+            prepareQuery.setObject(3, table.toUpperCase());
 
             // make a query against runtimemetadata and get results
             results = (MMResultSet) prepareQuery.executeQuery();

Modified: trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java	2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java	2009-10-25 02:09:27 UTC (rev 1541)
@@ -50,6 +50,8 @@
     interface Trace {
         String PROXIES = "proxies"; //$NON-NLS-1$
     }
+
+    public static final String SYSTEM_MODEL = "System"; //$NON-NLS-1$
     
     public static final String SYSTEM_VDB = "System.vdb"; //$NON-NLS-1$
 

Modified: trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java	2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java	2009-10-25 02:09:27 UTC (rev 1541)
@@ -74,7 +74,7 @@
     public static final String RELATIONAL_NAME                  = "Relational"; //$NON-NLS-1$
     public static final String RELATIONSHIP_NAME                = "Relationship"; //$NON-NLS-1$
     public static final String SIMPLEDATATYPES_INSTANCE_NAME    = "SimpleDatatypes-instance"; //$NON-NLS-1$
-    public static final String SYSTEM_NAME                      = "System"; //$NON-NLS-1$    
+    public static final String SYSTEM_NAME                      = CoreConstants.SYSTEM_MODEL;    
     public static final String SYSTEMADMIN_NAME                 = CoreConstants.SYSTEM_ADMIN_MODEL_NAME;
     public static final String SYSTEMADMINPHYSICAL_NAME         = CoreConstants.SYSTEM_ADMIN_PHYSICAL_MODEL_NAME;
     public static final String SYSTEMPHYSICAL_NAME              = CoreConstants.SYSTEM_PHYSICAL_MODEL_NAME;

Modified: trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml	2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml	2009-10-25 02:09:27 UTC (rev 1541)
@@ -1792,6 +1792,96 @@
         </tgroup>
       </informaltable>
     </sect2>
+    <sect2>
+      <title>System.ProcedureParamProperties</title>
+      <para>This supplies information on procedure parameters.
+      </para>
+      <informaltable frame="all">
+        <tgroup cols="3">
+          <thead>
+            <row>
+              <entry>
+                <para>Column Name</para>
+              </entry>
+              <entry>
+                <para>Type</para>
+              </entry>
+              <entry>
+                <para>Description</para>
+              </entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry>
+                <para>ModelName</para>
+              </entry>
+              <entry>
+                <para>string</para>
+              </entry>
+              <entry>
+                <para>Model name</para>
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <para>ProcedureName</para>
+              </entry>
+              <entry>
+                <para>string</para>
+              </entry>
+              <entry>
+                <para>Procedure name</para>
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <para>ProcedureParamName</para>
+              </entry>
+              <entry>
+                <para>string</para>
+              </entry>
+              <entry>
+                <para>Parameter name</para>
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <para>Name</para>
+              </entry>
+              <entry>
+                <para>string</para>
+              </entry>
+              <entry>
+                <para>Property name</para>
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <para>Value</para>
+              </entry>
+              <entry>
+                <para>string</para>
+              </entry>
+              <entry>
+                <para>Property value</para>
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <para>UID</para>
+              </entry>
+              <entry>
+                <para>string</para>
+              </entry>
+              <entry>
+                <para>param unique id</para>
+              </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+    </sect2>    
   </sect1>
   <sect1>
     <title>

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/pom.xml	2009-10-25 02:09:27 UTC (rev 1541)
@@ -336,11 +336,6 @@
 				<version>${project.version}</version>
 				<scope>test</scope>
 			</dependency>
-			<dependency>
-				<groupId>org.jboss.teiid</groupId>
-				<artifactId>teiid-connector-metadata</artifactId>
-				<version>${project.version}</version>
-			</dependency>
       
       <!-- External dependencies -->
 			<dependency>
@@ -458,7 +453,6 @@
 		<module>runtime</module>
 		<module>adminshell</module>
 		<module>test-integration</module>
-		<module>connector-metadata</module>
 		<module>cache-jbosscache</module>
 		<module>hibernate-dialect</module>
 	</modules>



More information about the teiid-commits mailing list