db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r575660 - in /db/derby/code/trunk/java: engine/org/apache/derby/catalog/types/RowMultiSetImpl.java testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Date Fri, 14 Sep 2007 12:37:40 GMT
Author: rhillegas
Date: Fri Sep 14 05:37:40 2007
New Revision: 575660

URL: http://svn.apache.org/viewvc?rev=575660&view=rev
Log:
DERBY-716: Change SQL name of row multi set so that dblook will emit re-playable DDL for table
functions.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RowMultiSetImpl.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RowMultiSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RowMultiSetImpl.java?rev=575660&r1=575659&r2=575660&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RowMultiSetImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RowMultiSetImpl.java Fri
Sep 14 05:37:40 2007
@@ -120,7 +120,8 @@
 
     /**
      * <p>
-     * Get the SQL name of this multi set.
+     * Get the SQL name of this multi set. This is the name suitable for
+     * replaying the DDL to create a Table Function.
      * </p>
      */
     public  String  getSQLTypeName()
@@ -128,18 +129,20 @@
         StringBuffer    buffer = new StringBuffer();
         int                     count = _columnNames.length;
 
-        buffer.append( "ROW ( " );
+        buffer.append( "TABLE ( " );
 
         for ( int i = 0; i < count; i++ )
         {
             if ( i > 0 ) { buffer.append( ", " ); }
 
+            buffer.append( '\"' );
             buffer.append( _columnNames[ i ] );
+            buffer.append( '\"' );
             buffer.append( ' ' );
             buffer.append( _types[ i ].getSQLstring() );
         }
 
-        buffer.append( " ) MULTISET" );
+        buffer.append( " )" );
 
         return buffer.toString();
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java?rev=575660&r1=575659&r2=575660&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Fri Sep 14 05:37:40 2007
@@ -97,8 +97,8 @@
         },
     };
 
-    private static  final   String  SFT_RETURN_TYPE = "ROW ( INTCOL INTEGER, VARCHARCOL VARCHAR(10)
) MULTISET";
-    private static  final   String  RADT_RETURN_TYPE = "ROW ( COLUMN0 BIGINT, COLUMN1 BLOB(2147483647),
COLUMN2 CHAR(10), COLUMN3 CHAR (10) FOR BIT DATA, COLUMN4 CLOB(2147483647), COLUMN5 DATE,
COLUMN6 DECIMAL(5,0), COLUMN7 DOUBLE, COLUMN8 DOUBLE, COLUMN9 REAL, COLUMN10 DOUBLE, COLUMN11
INTEGER, COLUMN12 LONG VARCHAR, COLUMN13 LONG VARCHAR FOR BIT DATA, COLUMN14 NUMERIC(5,0),
COLUMN15 REAL, COLUMN16 SMALLINT, COLUMN17 TIME, COLUMN18 TIMESTAMP, COLUMN19 VARCHAR(10),
COLUMN20 VARCHAR (10) FOR BIT DATA ) MULTISET";
+    private static  final   String  SFT_RETURN_TYPE = "TABLE ( \"INTCOL\" INTEGER, \"VARCHARCOL\"
VARCHAR(10) )";
+    private static  final   String  RADT_RETURN_TYPE = "TABLE ( \"COLUMN0\" BIGINT, \"COLUMN1\"
BLOB(2147483647), \"COLUMN2\" CHAR(10), \"COLUMN3\" CHAR (10) FOR BIT DATA, \"COLUMN4\" CLOB(2147483647),
\"COLUMN5\" DATE, \"COLUMN6\" DECIMAL(5,0), \"COLUMN7\" DOUBLE, \"COLUMN8\" DOUBLE, \"COLUMN9\"
REAL, \"COLUMN10\" DOUBLE, \"COLUMN11\" INTEGER, \"COLUMN12\" LONG VARCHAR, \"COLUMN13\" LONG
VARCHAR FOR BIT DATA, \"COLUMN14\" NUMERIC(5,0), \"COLUMN15\" REAL, \"COLUMN16\" SMALLINT,
\"COLUMN17\" TIME, \"COLUMN18\" TIMESTAMP, \"COLUMN19\" VARCHAR(10), \"COLUMN20\" VARCHAR
(10) FOR BIT DATA )";
     
     private static  final   Integer FUNCTION_COLUMN_IN = new Integer( JDBC40Translation.FUNCTION_PARAMETER_IN
);
     private static  final   Integer FUNCTION_RETURN_VALUE = new Integer( JDBC40Translation.FUNCTION_RETURN
);



Mime
View raw message