db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r357756 - in /db/derby/code/trunk/java/engine/org/apache/derby: catalog/types/ iapi/types/ impl/sql/compile/
Date Mon, 19 Dec 2005 19:06:39 GMT
Author: djd
Date: Mon Dec 19 11:06:27 2005
New Revision: 357756

URL: http://svn.apache.org/viewcvs?rev=357756&view=rev
Log:
DERBY-776 (partial) Remove type descriptor methods builtIn and systemBuiltIn and
replace their use with userType(). Simplifies the scheme to is a type a user type
(represented currently by a Java class) or a system defined type (e.g. INT, CHAR).
Previously the code had methods for three types but in reality all checks were for
is it a user type or not. Note that the only use externally for user types (Java types) is
in
the system catalogs. User-defined types are not supported in Derby, until SQL Part13
is implemented (create type as java class). If Derby ever supports other forms
of user-defined types, e.g. distinct types it would probably be better to change
the userType method to isJavaType(), which really represents its usage today.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java Mon
Dec 19 11:06:27 2005
@@ -69,10 +69,10 @@
     **
     ********************************************************/
 
-    protected String        SQLTypeName;
-    protected int           JDBCTypeId;
-    protected int           formatId;
-    protected int           wrapperTypeFormatId;
+    String        SQLTypeName;
+    int           JDBCTypeId;
+    int           formatId;
+    int           wrapperTypeFormatId;
 
     /**
      * niladic constructor. Needed for Formatable interface to work.
@@ -126,12 +126,6 @@
     public int getJDBCTypeId()
     {
         return JDBCTypeId;
-    }
-
-    /** Does this type id represent a system built-in type? */
-    public boolean systemBuiltIn()
-    {
-        return true;
     }
 
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
Mon Dec 19 11:06:27 2005
@@ -72,12 +72,6 @@
 		return className;
 	}
 
-	/** Does this type id represent a system built-in type? */
-	public boolean systemBuiltIn()
-	{
-		return false;
-	}
-
 	/** Does this type id represent a user type? */
 	public boolean userType()
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Mon
Dec 19 11:06:27 2005
@@ -483,7 +483,7 @@
 		 * types are system built-in types and the other if at least 1 is
 		 * a user type. (typePrecedence is meaningless for user types.)
 		 */
-		if (thisType.systemBuiltIn() && otherType.systemBuiltIn())
+		if (!thisType.userType() && !otherType.userType())
 		{
 			TypeId  higherTypeId;
 			TypeId  lowerTypeId;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java Mon Dec 19 11:06:27
2005
@@ -639,7 +639,6 @@
 
         /* Set in setTypeIdSpecificInstanceVariables() as needed */
         private boolean                 classNameWasDelimitedIdentifier;
-        private boolean                 isBuiltIn = true;
         private boolean                 isBitTypeId;
         private boolean                 isLOBTypeId;
         private boolean                 isBooleanTypeId;
@@ -898,7 +897,6 @@
                                         typePrecedence = USER_PRECEDENCE;
                                 }
                                 maxMaxWidth = -1;
-                                isBuiltIn = false;
                                 isUserDefinedTypeId = true;
                                 break;
 
@@ -1000,23 +998,6 @@
          *
          * @return      true for built-in types, false for user-defined types.
          */
-        public final boolean systemBuiltIn()
-        {
-                return baseTypeId.systemBuiltIn();
-        }
-
-        /**
-         * Tell whether this is a built-in type.
-         * NOTE: There are 3 "classes" of types:
-         *                      built-in                - system provided types which are
implemented internally
-         *                                                        (int, smallint, etc.)
-         *                      system built-in - system provided types, independent of implementation
-         *                                                        (date, time, etc.)
-         *                      user types              - types implemented outside of the
system
-         *                                                        (java.lang.Integer, asdf.asdf.asdf,
etc.)
-         *
-         * @return      true for built-in types, false for user-defined types.
-         */
         public final boolean userType()
         {
                 return baseTypeId.userType();
@@ -1206,23 +1187,6 @@
         public boolean isXMLTypeId()
         {
                return (formatId == StoredFormatIds.XML_TYPE_ID);
-        }
-
-        /**
-         * Tell whether this is a built-in type.
-         * NOTE: There are 3 "classes" of types:
-         *                      built-in                - system provided types which are
implemented internally
-         *                                                        (int, smallint, etc.)
-         *                      system built-in - system provided types, independent of implementation
-         *                                                        (date, time, etc.)
-         *                      user types              - types implemented outside of the
system
-         *                                                        (java.lang.Integer, asdf.asdf.asdf,
etc.)
-         *
-         * @return      true for built-in types, false for user-defined types.
-         */
-        public boolean builtIn()
-        {
-                return isBuiltIn;
         }
 
         /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseTypeCompiler.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseTypeCompiler.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseTypeCompiler.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseTypeCompiler.java
Mon Dec 19 11:06:27 2005
@@ -175,7 +175,7 @@
 		** If the other type is user-defined, use the java types to determine
 		** assignability.
 		*/
-		if ( ! otherType.builtIn())
+		if (otherType.userType())
 		{
 			return cf.getClassInspector().assignableTo(
 					thisType.getCorrespondingJavaTypeName(),

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
Mon Dec 19 11:06:27 2005
@@ -438,7 +438,7 @@
 		/* If I have Java types, I need only add java->sql->java if the types
 		 * are not comparable 
 		 */
-		if (!leftTypeId.systemBuiltIn())
+		if (leftTypeId.userType())
 		{
 			if (leftOperand.getTypeCompiler().comparable(leftTypeId, false,
 														   getClassFactory()))
@@ -449,7 +449,7 @@
 
 		TypeId rightTypeId = rightOperand.getTypeId();
 
-		if (!rightTypeId.systemBuiltIn())
+		if (rightTypeId.userType())
 		{
 			if (rightOperand.getTypeCompiler().comparable(rightTypeId, false,
 															getClassFactory()))

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
Mon Dec 19 11:06:27 2005
@@ -191,7 +191,7 @@
 		/* If the left operand is not a built-in type, then generate a conversion
 		 * tree to a built-in type.
 		 */
-		if (! leftOperand.getTypeId().systemBuiltIn())
+		if (leftOperand.getTypeId().userType())
 		{
 			leftOperand = leftOperand.genSQLJavaSQLTree();
 		}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
Mon Dec 19 11:06:27 2005
@@ -415,11 +415,11 @@
 	{
 		TypeId leftTypeId = leftOperand.getTypeId();
 		
-		if (!(leftTypeId.systemBuiltIn()))
+		if (leftTypeId.userType())
 			leftOperand = leftOperand.genSQLJavaSQLTree();
 
 		TypeId rightTypeId = rightOperand.getTypeId();
-		if (!(rightTypeId.systemBuiltIn()))
+		if (rightTypeId.userType())
 			rightOperand = rightOperand.genSQLJavaSQLTree();
 
 		return this;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java Mon Dec
19 11:06:27 2005
@@ -388,7 +388,7 @@
 		** If it is a java cast, do some work to make sure
 		** the classes are ok and that they are compatible
 		*/
-		if (! destCTI.systemBuiltIn())
+		if (destCTI.userType())
 		{
 			String className = ((TypeId) dataTypeServices.getTypeId()).getCorrespondingJavaTypeName();
 
@@ -1041,7 +1041,6 @@
 		*/
 		if (sourceCTI.userType())
 		{
-
 			String destinationType = getTypeId().getCorrespondingJavaTypeName();
 
 			// at this point method instance and cast result are on the stack

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
Mon Dec 19 11:06:27 2005
@@ -285,7 +285,7 @@
 		String			columnTypeName;
 
 		/* Built-in types need no checking */
-		if (dataTypeServices.getTypeId().builtIn())
+		if (!dataTypeServices.getTypeId().userType())
 			return;
 
 		ClassInspector classInspector = getClassFactory().getClassInspector();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
Mon Dec 19 11:06:27 2005
@@ -189,7 +189,7 @@
 		/* If the left operand is not a built-in type, then generate a bound conversion
 		 * tree to a built-in type.
 		 */
-		if (! leftOperand.getTypeId().systemBuiltIn())
+		if (leftOperand.getTypeId().userType())
 		{
 			leftOperand = leftOperand.genSQLJavaSQLTree();
 		}
@@ -197,7 +197,7 @@
 		/* If the right operand is not a built-in type, then generate a bound conversion
 		 * tree to a built-in type.
 		 */
-		if (! rightOperand.getTypeId().systemBuiltIn())
+		if (rightOperand.getTypeId().userType())
 		{
 			rightOperand = rightOperand.genSQLJavaSQLTree();
 		}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
Mon Dec 19 11:06:27 2005
@@ -483,7 +483,7 @@
 				newText.append(originalActionText.substring(start));
 			}
 			actionText = newText.toString();
-			actionNode = (StatementNode)reparseTriggerText(actionText);
+			actionNode = (StatementNode)reparseTriggerText();
 		}
 
 		return regenNode;
@@ -537,7 +537,7 @@
 	/*
 	** Parse the text and return the tree.
 	*/
-	private QueryTreeNode reparseTriggerText(String text) throws StandardException
+	private QueryTreeNode reparseTriggerText() throws StandardException
 	{
 		/*
 		** Get a new compiler context, so the parsing of the text
@@ -549,7 +549,7 @@
 
 		try
 		{
-			return QueryTreeNode.parseQueryText(newCC, text, (Object[])null, lcc);
+			return QueryTreeNode.parseQueryText(newCC, actionText, (Object[])null, lcc);
 		}
 
 		finally
@@ -609,9 +609,9 @@
 		** for user types, so call getSQLTypeName in that
 		** case.
 		*/
-		methodCall.append((typeId.systemBuiltIn() ? 
-					dts.getSQLstring() :
-					typeId.getSQLTypeName()) + ") ");
+		methodCall.append(
+		  (typeId.userType() ? typeId.getSQLTypeName() : dts.getSQLstring())
+				 + ") ");
 
 		return methodCall.toString();
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java Mon Dec
19 11:06:27 2005
@@ -926,7 +926,7 @@
 			/* If the where clause is not a built-in type, then generate a bound 
 			 * conversion tree to a built-in type.
 			 */
-			if (! joinTypeId.systemBuiltIn())
+			if (joinTypeId.userType())
 			{
 				joinClause = joinClause.genSQLJavaSQLTree();
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java Mon
Dec 19 11:06:27 2005
@@ -996,7 +996,7 @@
 										typeId,
 										cm);
 			}
-			else if ( ! typeId.builtIn())
+			else if (typeId.userType())
 			{
 				constantNode = nf.getNode(
 										C_NodeTypes.USERTYPE_CONSTANT_NODE,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java?rev=357756&r1=357755&r2=357756&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
Mon Dec 19 11:06:27 2005
@@ -894,7 +894,7 @@
 		/* If the receiver is not a built-in type, then generate a bound conversion
 		 * tree to a built-in type.
 		 */
-		if (! receiver.getTypeId().systemBuiltIn())
+		if (receiver.getTypeId().userType())
 		{
 			receiver = receiver.genSQLJavaSQLTree();
 		}
@@ -902,7 +902,7 @@
 		/* If the left operand is not a built-in type, then generate a bound conversion
 		 * tree to a built-in type.
 		 */
-		if (! leftOperand.getTypeId().systemBuiltIn())
+		if (leftOperand.getTypeId().userType())
 		{
 			leftOperand = leftOperand.genSQLJavaSQLTree();
 		}
@@ -912,7 +912,7 @@
 		 */
 		if (rightOperand != null)
 		{
-			if (! rightOperand.getTypeId().systemBuiltIn())
+			if (rightOperand.getTypeId().userType())
 			{
 				rightOperand = rightOperand.genSQLJavaSQLTree();
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
Mon Dec 19 11:06:27 2005
@@ -220,7 +220,7 @@
 	 	 * If the operand is not a build-in type, generate a bound conversion
 		 * tree to build-in types.
 		 */
-		if( ! operandType.systemBuiltIn() )
+		if (operandType.userType() )
 		{
 			operand = operand.genSQLJavaSQLTree();
 		}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
Mon Dec 19 11:06:27 2005
@@ -355,7 +355,7 @@
 		 * tree to a built-in type.
 		 */
 		if (! (operand instanceof UntypedNullConstantNode) &&
-			! operand.getTypeId().systemBuiltIn() &&
+			operand.getTypeId().userType() &&
 			! (this instanceof IsNullNode))
 		{
 			operand = operand.genSQLJavaSQLTree();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java Mon Dec
19 11:06:27 2005
@@ -912,7 +912,7 @@
 		/* If the where clause is not a built-in type, then generate a bound 
 		 * conversion tree to a built-in type.
 		 */
-		if (! whereTypeId.systemBuiltIn())
+		if (whereTypeId.userType())
 		{
 			whereClause = whereClause.genSQLJavaSQLTree();
 			whereTypeId = whereClause.getTypeId();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java Mon
Dec 19 11:06:27 2005
@@ -161,7 +161,7 @@
 		{
 			ValueNode valueNode = (ValueNode) elementAt(index);
 			
-			if (! valueNode.getTypeId().systemBuiltIn())
+			if (valueNode.getTypeId().userType())
 			{
 				setElementAt(valueNode.genSQLJavaSQLTree(), index);
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=357756&r1=357755&r2=357756&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Mon Dec
19 11:06:27 2005
@@ -8944,7 +8944,7 @@
 		/* We need to generate a SQL->Java conversion tree above us if
 		 * the dataTypeCast is a user type.
 		 */
-		if (! dts.getTypeId().builtIn())
+		if (dts.getTypeId().userType())
 		{
 			treeTop = (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.JAVA_TO_SQL_VALUE_NODE,



Mime
View raw message