db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r393304 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ engine/org/apache/derby/catalog/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/impl/sql/catalog/ testing/org/apache/derbyTesting/functionTests/master/ t...
Date Tue, 11 Apr 2006 20:16:28 GMT
Author: kahatlen
Date: Tue Apr 11 13:16:25 2006
New Revision: 393304

URL: http://svn.apache.org/viewcvs?rev=393304&view=rev
Log:
DERBY-924: new JDBC4 metadata API getFunctions() needs to be implemented

Implementation of DatabaseMetaData.getFunctions() in the client
driver. Added tests for getFunctions() in the metadata test and the
upgrade test.

Patch contributed by Dyre Tjeldvoll <Dyre.Tjeldvoll@Sun.COM>.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestDbMetaData.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java Tue Apr
11 13:16:25 2006
@@ -1119,6 +1119,84 @@
     }
 
 
+    /** 
+     * Get the function names available in the database.  Calls stored
+     * procedure <code>SYSIBM.SQLFunctions(CatalogName
+     * varchar(128), SchemaName varchar(128), FuncName varchar(128),
+     * Options varchar(4000))</code> on the server. This procedure
+     * will in turn call
+     * <code>EmbedDatabaseMetaData.getFunctions(String,String,String)</code><p>
+     * Compatibility: Only available if both server and client version
+     * > 10.1, and JDK version >= 1.6. Older clients will not have
+     * this method available. Newer clients will be able to call this
+     * method when connected to an older server, but this will be
+     * trigger an exception in
+     * <code>checkServerJdbcVersionX()</code>. <p>Upgrade:
+     * <code>SYSIBM.SQLFunctions</code> is added in
+     * <code>DataDictionaryImpl.create_10_2_system_procedures
+     * (TransactionController,UUID)</code> so it will become available
+     * in newly created databases and after <b>hard</b> upgrade.
+     *
+     * @param catalog limit search to this catalog
+     * @param schemaPattern limit search to schemas matching this pattern
+     * @param functionNamePattern limit search to functions matching this 
+     * pattern
+     * @return a <code>ResultSet</code> listing the fucntions
+     * @exception SqlException if a database error occurs
+     * @see #getFunctionsX(String, String, String)
+     * @see org.apache.derby.impl.sql.catalog.DataDictionaryImpl#create_10_2_system_procedures(TransactionController,UUID)
+     * @see org.apache.derby.impl.jdbc.EmbedDatabaseMetaData#getFunctions(String,String,String)
+     */
+
+    public java.sql.ResultSet getFunctions(String catalog,
+                                           String schemaPattern,
+                                           String functionNamePattern) 
+        throws SQLException {
+        try {
+            synchronized (connection_) {
+                if (agent_.loggingEnabled()) {
+                    agent_.logWriter_.traceEntry(this, "getFunctions", 
+                                                 catalog, schemaPattern, 
+                                                 functionNamePattern);
+                }
+                return getFunctionsX(catalog, schemaPattern, 
+                                     functionNamePattern);
+            }
+        }
+        catch (SqlException se) {
+            throw se.getSQLException();
+        }
+    }
+
+    /** 
+     * Untraced version of <code>getFunctions(String, String, String)</code>.
+     * @param catalog limit search to this catalog
+     * @param schemaPattern limit search to schemas matching this pattern
+     * @param functionNamePattern limit search to functions matching this 
+     * pattern
+     * @return a <code>ResultSet</code> listing the fucntions
+     * @excption SqlException if a database error occurs
+     * @see #getFunctions(String, String, String)
+     */
+    private ResultSet getFunctionsX(String catalog,
+                                    String schemaPattern,
+                                    String functionNamePattern) 
+        throws SqlException {
+        checkForClosedConnectionX();
+        checkServerJdbcVersionX("getFunctions(String,String,String)", 4, 0); 
+
+        PreparedStatement cs = 
+            prepareMetaDataQuery("SYSIBM.SQLFUNCTIONS(?,?,?,?)");
+
+        cs.setStringX(1, catalog);
+        cs.setStringX(2, schemaPattern);
+        cs.setStringX(3, functionNamePattern);
+        cs.setStringX(4, getOptions());
+        lastGetProceduresResultSet_ = executeCatalogQuery(cs);
+        return lastGetProceduresResultSet_;
+    }
+
+
     // call stored procedure SQLTables
     // SYSIBM.SQLTables(
     //              CatalogName varchar(128),

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java Tue Apr
11 13:16:25 2006
@@ -202,6 +202,27 @@
 	}
 
 	/**
+	 *  Map SQLFunctions to EmbedDatabaseMetaData.getFunctions
+	 *
+	 *  @param catalogName SYSIBM.SQLFunctions CatalogName varchar(128),
+	 *  @param schemaName  SYSIBM.SQLFunctions SchemaName  varchar(128),
+	 *  @param funcName    SYSIBM.SQLFunctions ProcName    varchar(128),
+	 *  @param options     SYSIBM.SQLFunctions Options     varchar(4000)) 
+	 *                     (not used)
+	 *  @param rs          output parameter, the resultset object containing 
+	 *                     the result of getFunctions
+	 */
+	public static void SQLFUNCTIONS(String catalogName, 
+									String schemaName, 
+									String funcName,
+									String options, 
+									ResultSet[] rs) throws SQLException
+	{
+		rs[0] = ((EmbedDatabaseMetaData)getDMD()).
+			getFunctions(catalogName, schemaName, funcName);
+	}
+
+	/**
 	 *  Map SQLTables to EmbedDatabaseMetaData.getSchemas, getCatalogs, getTableTypes and getTables
 	 *
 	 *                     containing the result of the DatabaseMetaData calls

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
Tue Apr 11 13:16:25 2006
@@ -1417,10 +1417,40 @@
 		return doGetProcs(catalog, schemaPattern,
 			procedureNamePattern, "odbc_getProcedures");
 	}
+    
+    /**
+     * Implements DatabaseMetaData.getFunctions() for an embedded
+     * database. Queries the database to get information about
+     * functions (procedures returning values). Executes the
+     * 'getFunctions' query from metadata.properties to obtain the
+     * ResultSet to return.<p> Compatibility: This is a new method in
+     * the API which is only available with with Derby versions > 10.1 and
+     * JDK versions >= 1.6 <p>Upgrade: Since this is a new query it
+     * does not have an SPS, and will be available as soon as any
+     * database, new or old, is booted with the new version of Derby,
+     * (in <b>soft and hard</b> upgrade).
+     * @param catalog limit the search to functions in this catalog 
+     * (not used)
+     * @param schemaPattern limit the search to functions in schemas 
+     * matching this pattern
+     * @param functionNamePattern limit the search to functions 
+     * matching this pattern
+     * @return a ResultSet with metadata information
+     * @throws SQLException if any of the underlying jdbc methods fail
+     */
+    public ResultSet getFunctions(java.lang.String catalog,
+                                  java.lang.String schemaPattern,
+                                  java.lang.String functionNamePattern)
+        throws SQLException
+    {
+        return doGetProcs(catalog, schemaPattern,
+                   functionNamePattern, "getFunctions");
+    }
 
 	/**
-	 * Does the actual work for the getProcedures metadata calls.
-	 * See getProcedures() method above for parameter descriptions.
+	 * Does the actual work for the getProcedures and getFunctions
+	 * metadata calls.  See getProcedures() method above for parameter
+	 * descriptions.
 	 * @param queryName Name of the query to execute; is used
 	 *	to determine whether the result set should conform to
 	 *	JDBC or ODBC specifications.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java
Tue Apr 11 13:16:25 2006
@@ -68,32 +68,6 @@
         return false;
     }
 
-    /**
-     * Implements DatabaseMetaData.getFunctions() for an
-     * embedded database. Queries the database to get information
-     * about functions (procedures returning values). Executes the
-     * 'getFunctions' query from metadata.properties to obtain the
-     * ResultSet to return.
-     * @param catalog limit the search to functions in this catalog 
-     * (not used)
-     * @param schemaPattern limit the search to functions in schemas 
-     * matching this pattern
-     * @param functionNamePattern limit the search to functions 
-     * matching this pattern
-     * @return a ResultSet with metadata information
-     * @throws SQLException if any of the underlying jdbc methods fail
-     */
-    public ResultSet getFunctions(java.lang.String catalog,
-                                  java.lang.String schemaPattern,
-                                  java.lang.String functionNamePattern)
-        throws SQLException
-    {
-        PreparedStatement s = getPreparedQuery("getFunctions");
-        s.setString(1, swapNull(catalog));
-        s.setString(2, swapNull(schemaPattern));
-        s.setString(3, swapNull(functionNamePattern));
-        return s.executeQuery();
-    }
     
     public ResultSet getFunctionParameters(java.lang.String catalog,
                                 java.lang.String schemaPattern,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Tue Apr 11 13:16:25 2006
@@ -9673,6 +9673,35 @@
                 tc);
         }
 
+        // SYSIBM.SQLFUNCTIONS(VARCHAR(128), VARCHAR(128), VARCHAR(128), 
+	// VARCHAR(4000))
+        {
+
+            // procedure argument names
+            String[] arg_names = {
+				"CATALOGNAME",
+				"SCHEMANAME",
+				"FUNCNAME",
+				"OPTIONS"};
+
+            // procedure argument types
+            TypeDescriptor[] arg_types = {
+				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128),
+				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128),
+				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 128),
+				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, 4000)};
+
+            createSystemProcedureOrFunction(
+                "SQLFUNCTIONS",
+                getSysIBMSchemaDescriptor().getUUID(),
+                arg_names,
+                arg_types,
+				0,
+				1,
+                RoutineAliasInfo.READS_SQL_DATA,
+                (TypeDescriptor) null,
+                tc);
+        }
     }
 
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
Tue Apr 11 13:16:25 2006
@@ -44,6 +44,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
Tue Apr 11 13:16:25 2006
@@ -44,6 +44,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
Tue Apr 11 13:16:25 2006
@@ -74,6 +74,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
Tue Apr 11 13:16:25 2006
@@ -732,6 +732,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :
@@ -2060,6 +2089,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
Tue Apr 11 13:16:25 2006
@@ -44,6 +44,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
Tue Apr 11 13:16:25 2006
@@ -74,6 +74,35 @@
 ,APP,GETPCTEST4A,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4a,1
 ,APP,GETPCTEST4B,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
 ,APP,GETPCTEST4BX,null,null,null,org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b,1
+getFunctions(null,null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("Dummy Catalog",null,null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,APP,DUMMY1,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY2,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY3,java.some.func,xxxxGENERATED-IDxxxx
+null,APP,DUMMY4,java.some.func,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,"%SYS%",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_CHECK_TABLE,org.apache.derby.catalog.SystemProcedures.SYSCS_CHECK_TABLE,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions(null,null,"%GET%"):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
+null,SYSCS_UTIL,SYSCS_GET_DATABASE_PROPERTY,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_DATABASE_PROPERTY,xxxxGENERATED-IDxxxx
+null,SYSCS_UTIL,SYSCS_GET_RUNTIMESTATISTICS,org.apache.derby.catalog.SystemProcedures.SYSCS_GET_RUNTIMESTATISTICS,xxxxGENERATED-IDxxxx
+getFunctions("","",null):
+FUNCTION_CAT[VARCHAR],FUNCTION_SCHEM[VARCHAR],FUNCTION_NAME[VARCHAR],REMARKS[VARCHAR],SPECIFIC_NAME[VARCHAR]
 getUDTs() with user-named types null :
 TYPE_CAT[CHAR],TYPE_SCHEM[CHAR],TYPE_NAME[VARCHAR],CLASS_NAME[LONG VARCHAR],DATA_TYPE[INTEGER],REMARKS[CHAR]
 getUDTs() with user-named types in ('JAVA_OBJECT') :

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestDbMetaData.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestDbMetaData.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestDbMetaData.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestDbMetaData.java
Tue Apr 11 13:16:25 2006
@@ -127,32 +127,20 @@
             ame.printStackTrace(System.out);
         }
 
-        try {
-			// Any function in any schema in any catalog
-			dumpRS(met.getFunctions(null, null, null));
-			// Any function in any schema in "Dummy
-			// Catalog". Same as above since the catalog
-			// argument is ignored (is always null)
-			dumpRS(met.getFunctions("Dummy Catalog", null, null));
-			// Any function in a schema starting with "SYS"
-			dumpRS(met.getFunctions(null, "SYS%", null));
-			// All functions containing "GET" in any schema 
-			// (and any catalog)
-			dumpRS(met.getFunctions(null, null, "%GET%"));
-			// Any function that belongs to NO schema and 
-			// NO catalog (none)
-			checkEmptyRS(met.getFunctions("", "", null));
-            
-        } catch (SQLException e) {
-            // TODO: remove try/catch once method is implemented!
-            System.out.println("getFunctions():");
-            dumpSQLExceptions(e);
-        } catch (AbstractMethodError ame) {
-            // TODO: No implementation on client yet, so catch
-            // AbstractMethodError for now. Remove when implemented.
-            System.out.println("getClientInfoProperties():");
-            ame.printStackTrace(System.out);
-        }
+        // Any function in any schema in any catalog
+        dumpRS(met.getFunctions(null, null, null));
+        // Any function in any schema in "Dummy
+        // Catalog". Same as above since the catalog
+        // argument is ignored (is always null)
+        dumpRS(met.getFunctions("Dummy Catalog", null, null));
+        // Any function in a schema starting with "SYS"
+        dumpRS(met.getFunctions(null, "SYS%", null));
+        // All functions containing "GET" in any schema 
+        // (and any catalog)
+        dumpRS(met.getFunctions(null, null, "%GET%"));
+        // Any function that belongs to NO schema and 
+        // NO catalog (none)
+        checkEmptyRS(met.getFunctions("", "", null));
 
         try {
             // 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java?rev=393304&r1=393303&r2=393304&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
Tue Apr 11 13:16:25 2006
@@ -349,6 +349,25 @@
 				"'org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getpc4b'" +
 				" parameter style java"); 
 
+						// Create functions so we can test
+						// getFunctions()
+						s.execute("CREATE FUNCTION DUMMY1 ( X SMALLINT ) "+
+								  "RETURNS SMALLINT PARAMETER STYLE JAVA "+
+								  "NO SQL LANGUAGE JAVA EXTERNAL "+
+								  "NAME 'java.some.func'");
+						s.execute("CREATE FUNCTION DUMMY2 ( X INTEGER, Y "+
+								  "SMALLINT ) RETURNS INTEGER PARAMETER STYLE"+
+								  " JAVA NO SQL LANGUAGE JAVA "+
+								  "EXTERNAL NAME 'java.some.func'");
+						s.execute("CREATE FUNCTION DUMMY3 ( X VARCHAR(16), "+
+								  "Y INTEGER ) RETURNS VARCHAR(16) PARAMETER"+
+								  " STYLE JAVA NO SQL LANGUAGE"+
+								  " JAVA EXTERNAL NAME 'java.some.func'");
+						s.execute("CREATE FUNCTION DUMMY4 ( X VARCHAR(128), "+
+								  "Y INTEGER ) RETURNS INTEGER PARAMETER "+
+								  "STYLE JAVA NO SQL LANGUAGE "+
+								  "JAVA EXTERNAL NAME 'java.some.func'");
+						
 			met = con.getMetaData();
 
 			System.out.println("JDBC Driver '" + met.getDriverName() +
@@ -399,6 +418,52 @@
 				new String [] {null, "%", "GETPCTEST%"},
 				null, null, null));
 
+			// Using reflection to check if we have getFunctions in the
+			// the current version of Derby
+			try {
+				Class s = "".getClass();
+				Class [] a = new Class [] { s, s, s };
+				
+				// Make sure the method is actually implemented
+				java.lang.reflect.Method gf = 
+					met.getClass().getMethod("getFunctions", a);
+				if (!java.lang.reflect.Modifier.isAbstract(gf.getModifiers())){
+					// Any function in any schema in any catalog
+					System.out.println("getFunctions(null,null,null):");
+					dumpRS(0, (ResultSet)gf.
+						   invoke(met, new String [] {null, null, null}));
+
+					// Any function in any schema in "Dummy
+					// Catalog". Same as above since the catalog
+					// argument is ignored (is always null)
+					System.out.println("getFunctions(\"Dummy Catalog\",null,"+
+									   "null):");
+					dumpRS(0, (ResultSet)gf.
+						   invoke(met, new String [] {"Dummy Catalog", 
+													  null, null}));
+
+					// Any function in a schema starting with "SYS"
+					System.out.println("getFunctions(null,\"%SYS%\",null):");
+					dumpRS(0, (ResultSet)gf.
+						   invoke(met, new String [] {null, "SYS%", null}));
+
+					// All functions containing "GET" in any schema
+					// (and any catalog)
+					System.out.println("getFunctions(null,null,\"%GET%\"):");
+					dumpRS(0, (ResultSet)gf.
+						   invoke(met, new String [] {null, null, "%GET%"}));
+
+					// Any function that belongs to NO schema and
+					// NO catalog (none)
+					System.out.println("getFunctions(\"\",\"\",null):");
+					dumpRS(0, (ResultSet)gf.
+						   invoke(met, new String [] {"", "", null}));
+
+				}
+			} 
+			catch (NoSuchMethodException e) {}
+			catch (Exception e) { e.printStackTrace(); }
+
 			System.out.println("getUDTs() with user-named types null :");
  			dumpRS(met.getUDTs(null, null, null, null));
 
@@ -1352,7 +1417,8 @@
 			"procedure getpctest1", "procedure getpctest2",
 			"procedure getpctest3a", "procedure getpctest3b",
 			"procedure getpctest4a", "procedure getpctest4b", "procedure getpctest4bx",
-			"procedure isreadO" };
+			"procedure isreadO", "FUNCTION DUMMY1", "FUNCTION DUMMY2", 
+			"FUNCTION DUMMY3", "FUNCTION DUMMY4" };
 		TestUtil.cleanUpTest(stmt, testObjects);
 	}
 	



Mime
View raw message