db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r1531821 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/types/DataTypeUtilities.java engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
Date Mon, 14 Oct 2013 09:10:15 GMT
Author: dyre
Date: Mon Oct 14 09:10:15 2013
New Revision: 1531821

URL: http://svn.apache.org/r1531821
Log:
DERBY-2423: Make EmbedResultSetMetaData.isCrurrency() return false for DECIMAL and NUMERIC
columns.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java?rev=1531821&r1=1531820&r2=1531821&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java Mon
Oct 14 09:10:15 2013
@@ -88,17 +88,6 @@ public abstract class DataTypeUtilities 
 
 
 	/**
-		Is the data type currency.
-		@param	dtd			data type descriptor
-	*/
-	public static boolean isCurrency(DataTypeDescriptor dtd) {
-		int typeId = dtd.getTypeId().getJDBCTypeId();
-
-		// Only the NUMERIC and DECIMAL types are currency
-		return ((typeId == Types.DECIMAL) || (typeId == Types.NUMERIC));
-	}
-
-	/**
 		Is the data type case sensitive.
 		@param	dtd			data type descriptor
 	*/

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java?rev=1531821&r1=1531820&r2=1531821&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java
Mon Oct 14 09:10:15 2013
@@ -118,15 +118,15 @@ public class EmbedResultSetMetaData impl
 	}
 
     /**
-     * Is the column a cash value?
+     * Is the column a cash value? Always returns false since there
+     * are no currency data types in Derby.
      *
      * @param column the first column is 1, the second is 2, ...
-     * @return true if so
-	 * @exception SQLException thrown on failure
+     * @return false, always
+     * @exception SQLException thrown on failure
      */
 	public final boolean isCurrency(int column) throws SQLException	{
-
-		return DataTypeUtilities.isCurrency(getColumnTypeDescriptor(column));
+		return false;
 	}
 
     /**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java?rev=1531821&r1=1531820&r2=1531821&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
Mon Oct 14 09:10:15 2013
@@ -272,11 +272,7 @@ public class ResultSetMiscTest extends B
         assertFalse(met.isAutoIncrement(10));
         assertFalse(met.isCaseSensitive(10));
         assertTrue(met.isSearchable(10));
-        // DERBY-2423 Embedded and client differ on isCurrency() for
-        // DECIMAL and NUMERIC columns. Enable for embedded once the
-        // issue is fixed
-        if (usingDerbyNetClient())
-            assertFalse(met.isCurrency(10));
+        assertFalse(met.isCurrency(10));
         assertEquals(ResultSetMetaData.columnNullable, met.isNullable(10));
         assertTrue(met.isSigned(10));
         assertEquals(12, met.getColumnDisplaySize(10));



Mime
View raw message