db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r450950 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile: ConstantNode.java LOBConstantNode.java UserTypeConstantNode.java XMLConstantNode.java
Date Thu, 28 Sep 2006 18:06:46 GMT
Author: djd
Date: Thu Sep 28 11:06:46 2006
New Revision: 450950

URL: http://svn.apache.org/viewvc?view=rev&rev=450950
Log:
Minor cleanup of query tree ConstantNodes, removing some unused code.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLConstantNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java?view=diff&rev=450950&r1=450949&r2=450950
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java Thu
Sep 28 11:06:46 2006
@@ -65,7 +65,7 @@
  */
 abstract class ConstantNode extends ValueNode
 {
-	protected	DataValueDescriptor	value;
+	DataValueDescriptor	value;
 
 	/*
 	** In case generateExpression() is called twice (something
@@ -255,7 +255,7 @@
 	 * Return whether or not this node represents a typed null constant.
 	 *
 	 */
-	public boolean isNull()
+	boolean isNull()
 	{
 		return (value == null || value.isNull());
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBConstantNode.java?view=diff&rev=450950&r1=450949&r2=450950
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBConstantNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBConstantNode.java
Thu Sep 28 11:06:46 2006
@@ -109,32 +109,6 @@
 	}
 
 	/**
-	 * Return the value from this LOBConstantNode
-	 *
-	 * @return	The value of this LOBConstantNode.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	public String	getString() throws StandardException
-	{
-		return value.getString();
-	}
-
-	/**
-	 * Return the length
-	 *
-	 * @return	The length of the value this node represents
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	//public int	getLength() throws StandardException
-	//{
-	//	return value.getLength();
-	//}
-
-	/**
 	 * Return an Object representing the bind time value of this
 	 * expression tree.  If the expression tree does not evaluate to
 	 * a constant at bind time then we return null.
@@ -164,6 +138,6 @@
 	{
 		// The generated java is the expression:
 		// "#getString()"
-		mb.push(getString());
+		mb.push(value.getString());
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java?view=diff&rev=450950&r1=450949&r2=450950
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java
Thu Sep 28 11:06:46 2006
@@ -191,58 +191,6 @@
 	}
 
 	/**
-	 * Return the value of this user defined type as a Storable
-	 *
-	 * @return	the value of this constant as a UserType
-	 * @exception StandardException thrown on failure
-	 */
-    public	DataValueDescriptor	getStorableValue()
-			throws StandardException
-	{
-        if( value instanceof DataValueDescriptor)
-            return ((DataValueDescriptor) value).getClone();
-        
-		DataValueFactory			dvf = getDataValueFactory();
-		TypeId			typeID = getTypeId();
-		String						typeName = typeID.getSQLTypeName();
-
-		if ( typeName.equals( TypeId.DATE_NAME ) )
-		{
-			return	new SQLDate((Date) value);
-		}
-		else if ( typeName.equals( TypeId.TIME_NAME ) )
-		{
-			return	new SQLTime( (Time) value);
-		}
-		else if ( typeName.equals( TypeId.TIMESTAMP_NAME ) )
-		{
-			return	new SQLTimestamp( (Timestamp) value);
-		}
-		else
-		{
-			return	dvf.getDataValue( value, (UserDataValue) null );
-		}
-	}
-
-	/**
-	 * Sets the object value of this user defined type
-	 *
-	 * @param	newValue	the value of this constant. can't use setValue() for this.
-	 */
-    public	void	setObjectValue( Object newValue ) { value = newValue; }
-
-	/**
-	 * Return the length
-	 *
-	 * @return	The length of the value this node represents
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	//public int	getLength() throws StandardException {
-	//	return TypeDescriptor.MAXIMUM_WIDTH_UNKNOWN;
-	//}
-
-	/**
 	 * Return an Object representing the bind time value of this
 	 * expression tree.  If the expression tree does not evaluate to
 	 * a constant at bind time then we return null.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLConstantNode.java?view=diff&rev=450950&r1=450949&r2=450950
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLConstantNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLConstantNode.java
Thu Sep 28 11:06:46 2006
@@ -51,18 +51,6 @@
     }
 
     /**
-     * Return the value from this XMLConstantNode as a string.
-     *
-     * @return The value of this XMLConstantNode as a string.
-     *
-     * @exception StandardException Thrown on error
-     */
-    public String getString() throws StandardException
-    {
-        return value.getString();
-    }
-
-    /**
      * Return an Object representing the bind time value of this
      * expression tree.  If the expression tree does not evaluate to
      * a constant at bind time then we return null.
@@ -93,6 +81,6 @@
     {
         // The generated java is the expression:
         // "#getString()"
-        mb.push(getString());
+        mb.push(value.getString());
     }
 }



Mime
View raw message