db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r612525 [2/2] - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ engine/org/apache/derby/catalog/types/ engine/org/apache/derby/iapi/services/io/ engine/org/apache/derby/iapi/sql/compile/ engine/org/apache/derby/iapi/types/ ...
Date Wed, 16 Jan 2008 17:29:13 GMT
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java?rev=612525&r1=612524&r2=612525&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
Wed Jan 16 09:29:02 2008
@@ -563,8 +563,7 @@
 
 		receiver = castArgToString(receiver);
 
-		if ((receiverType.getTypeFormatId() == StoredFormatIds.CLOB_TYPE_ID) ||
-		   (receiverType.getTypeFormatId() == StoredFormatIds.NCLOB_TYPE_ID)) {
+		if (receiverType.getTypeFormatId() == StoredFormatIds.CLOB_TYPE_ID) {
 		// special case for CLOBs: if we start with a CLOB, we have to get
 		// a CLOB as a result (as opposed to a VARCHAR), because we can have a 
 		// CLOB that is beyond the max length of VARCHAR (ex. "clob(100k)").
@@ -809,8 +808,7 @@
 				throwBadType("SUBSTR", receiverType.getSQLTypeName());
 			}
 		}
-		if ((receiverType.getTypeFormatId() == StoredFormatIds.CLOB_TYPE_ID) ||
-		   (receiverType.getTypeFormatId() == StoredFormatIds.NCLOB_TYPE_ID)) {
+		if (receiverType.getTypeFormatId() == StoredFormatIds.CLOB_TYPE_ID) {
 		// special case for CLOBs: if we start with a CLOB, we have to get
 		// a CLOB as a result (as opposed to a VARCHAR), because we can have a 
 		// CLOB that is beyond the max length of VARCHAR (ex. "clob(100k)").

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java?rev=612525&r1=612524&r2=612525&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
Wed Jan 16 09:29:02 2008
@@ -52,9 +52,6 @@
         static TypeCompiler longintTypeCompiler ;
         static TypeCompiler longvarbitTypeCompiler ;
         static TypeCompiler longvarcharTypeCompiler ;
-        static TypeCompiler nationalCharTypeCompiler ;
-        static TypeCompiler nationalLongvarcharTypeCompiler ;
-        static TypeCompiler nationalVarcharTypeCompiler ;
         static TypeCompiler realTypeCompiler ;
         static TypeCompiler smallintTypeCompiler ;
         static TypeCompiler tinyintTypeCompiler ;
@@ -66,7 +63,6 @@
         static TypeCompiler refTypeCompiler ;
         static TypeCompiler blobTypeCompiler ;
         static TypeCompiler clobTypeCompiler ;
-        static TypeCompiler nclobTypeCompiler ;
         static TypeCompiler xmlTypeCompiler ;
 
         /**
@@ -103,20 +99,10 @@
 
                   case Types.CHAR:
                           sqlTypeName = typeId.getSQLTypeName();
-                          if (sqlTypeName.equals(TypeId.CHAR_NAME))
-                          {
-                                return charTypeCompiler =
-                                        getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
-                                                                charTypeCompiler,
-                                                                typeId);
-                          }
-                          else
-                          {
-                                return nationalCharTypeCompiler =
-                                        getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
-                                                                nationalCharTypeCompiler,
-                                                                typeId);
-                          }
+                          return charTypeCompiler =
+                              getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
+                                                      charTypeCompiler,
+                                                      typeId);
 
                   case Types.NUMERIC:
                   case Types.DECIMAL:
@@ -157,33 +143,16 @@
 
                   case JDBC20Translation.SQL_TYPES_CLOB:
                       sqlTypeName = typeId.getSQLTypeName();
-                      if (sqlTypeName.equals(TypeId.CLOB_NAME)) {
-                          return clobTypeCompiler =
-                              getAnInstance(PACKAGE_NAME + "CLOBTypeCompiler",
-                                            clobTypeCompiler,
-                                            typeId);
-                      } else {
-                          return nclobTypeCompiler =
-                              getAnInstance(PACKAGE_NAME + "CLOBTypeCompiler",
-                                            nclobTypeCompiler,
-                                            typeId);
-                      }
+                      return clobTypeCompiler =
+                          getAnInstance(PACKAGE_NAME + "CLOBTypeCompiler",
+                                        clobTypeCompiler,
+                                        typeId);
                   case Types.LONGVARCHAR:
                           sqlTypeName = typeId.getSQLTypeName();
-                          if (sqlTypeName.equals(TypeId.LONGVARCHAR_NAME))
-                          {
-                                return longvarcharTypeCompiler =
-                                        getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
-                                                                longvarcharTypeCompiler,
-                                                                typeId);
-                          }
-                          else
-                          {
-                                return nationalLongvarcharTypeCompiler =
-                                        getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
-                                                                nationalLongvarcharTypeCompiler,
-                                                                typeId);
-                          }
+                          return longvarcharTypeCompiler =
+                              getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
+                                                      longvarcharTypeCompiler,
+                                                      typeId);
 
                   case Types.REAL:
                         return realTypeCompiler =
@@ -227,20 +196,10 @@
 
                   case Types.VARCHAR:
                           sqlTypeName = typeId.getSQLTypeName();
-                          if (sqlTypeName.equals(TypeId.VARCHAR_NAME))
-                          {
-                                return varcharTypeCompiler =
-                                        getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
-                                                                varcharTypeCompiler,
-                                                                typeId);
-                          }
-                          else
-                          {
-                                return nationalVarcharTypeCompiler =
-                                        getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
-                                                                nationalVarcharTypeCompiler,
-                                                                typeId);
-                          }
+                          return varcharTypeCompiler =
+                              getAnInstance(PACKAGE_NAME + "CharTypeCompiler",
+                                                      varcharTypeCompiler,
+                                                      typeId);
 
                   case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
                   case Types.OTHER:



Mime
View raw message