db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r475803 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile: SQLToJavaValueNode.java StaticMethodCallNode.java
Date Thu, 16 Nov 2006 16:36:42 GMT
Author: djd
Date: Thu Nov 16 08:36:41 2006
New Revision: 475803

URL: http://svn.apache.org/viewvc?view=rev&rev=475803
Log:
DERBY-1030 (partial) Add some comments to the logic for the RETURNS ON NULL INPUT's state
field.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java?view=diff&rev=475803&r1=475802&r2=475803
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
Thu Nov 16 08:36:41 2006
@@ -59,6 +59,16 @@
 {
 	ValueNode	value;
 
+    /**
+     * If set then this SQL value is being passed into a SQL function
+     * declared RETURNS NULL ON NULL input. In this case this node
+     * performs NULL checking logic in addition simple translation
+     * from the SQL domain to the Java domain. Thus if this
+     * is set then this node can not be removed when it
+     * is paired with a JavaToSQLValueNode.
+     * This field is set at generate time of the
+     * enclosing StaticMethodCallNode.
+     */
 	LocalField	returnsNullOnNullState;
 
 	/**
@@ -326,7 +336,7 @@
 	public void generateExpression(ExpressionClassBuilder acb,
 											MethodBuilder mb)
 									throws StandardException
-	{
+	{       
 		/* Compile the expression under us */
 		generateSQLValue( acb, mb );
 
@@ -344,7 +354,7 @@
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public void generateSQLValue(ExpressionClassBuilder acb,
+	private void generateSQLValue(ExpressionClassBuilder acb,
 											MethodBuilder mb)
 									throws StandardException
 	{
@@ -362,7 +372,7 @@
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public void generateJavaValue
+	private void generateJavaValue
 	(
 		ExpressionClassBuilder	acb,
 		MethodBuilder mbex

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java?view=diff&rev=475803&r1=475802&r2=475803
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
Thu Nov 16 08:36:41 2006
@@ -120,6 +120,13 @@
 	private boolean		isSystemCode;
 	private boolean		alreadyBound;
 
+    /**
+     * Generated boolean field to hold the indicator
+     * for if any of the parameters to a
+     * RETURNS NULL ON NULL INPUT function are NULL.
+     * Only set if this node is calling such a function.
+     * Set at generation time.
+     */
 	private LocalField	returnsNullOnNullState;
 
 



Mime
View raw message