db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r542282 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
Date Mon, 28 May 2007 17:57:07 GMT
Author: mikem
Date: Mon May 28 10:57:06 2007
New Revision: 542282

URL: http://svn.apache.org/viewvc?view=rev&rev=542282
Log:
fix whitespace for ascii graphs in comments.


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

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java?view=diff&rev=542282&r1=542281&r2=542282
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
Mon May 28 10:57:06 2007
@@ -19,7 +19,7 @@
 
  */
 
-package	org.apache.derby.impl.sql.compile;
+package org.apache.derby.impl.sql.compile;
 
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
@@ -121,10 +121,10 @@
      *
      * receiver like pattern [ escape escapeValue ]
      *
-     * @param receiver   		The left operand of the like: 
+     * @param receiver      The left operand of the like: 
      *                              column, CharConstant or Parameter
-     * @param leftOperand		The right operand of the like: the pattern
-     * @param rightOperand		The optional escape clause, null if not present
+     * @param leftOperand   The right operand of the like: the pattern
+     * @param rightOperand  The optional escape clause, null if not present
      */
     public void init(
     Object receiver,
@@ -143,7 +143,7 @@
      * overrides BindOperatorNode.bindExpression because like has special
      * requirements for parameter binding.
      *
-     * @return	The new top of the expression tree.
+     * @return  The new top of the expression tree.
      *
      * @exception StandardException thrown on failure
      */
@@ -308,9 +308,9 @@
          *
          * The transformed tree will become:
          *
-         *			AND
-         *		   /   \
-         *	     LIKE   =
+         *        AND
+         *       /   \
+         *     LIKE   =
          */
 
         if ((receiver instanceof ColumnReference) && 
@@ -372,11 +372,11 @@
 
                     // create new and node and hook in "equals" the new "=' node
                     //
-                    //			AND
-                    //		   /   \
-                    //	     LIKE  = 
-                    //	          / \
-                    //	    column  'Derby'
+                    //        AND
+                    //       /   \
+                    //     LIKE   = 
+                    //           / \
+                    //       column 'Derby'
 
                     AndNode newAnd = 
                         (AndNode) getNodeFactory().getNode(
@@ -470,14 +470,14 @@
     /**
     * Bind this operator
     *
-    * @exception StandardException		Thrown on error
+    * @exception StandardException  Thrown on error
     */
 
     public void bindComparisonOperator()
         throws StandardException
     {
-        TypeId	receiverType = receiver.getTypeId();
-        TypeId	leftType     = leftOperand.getTypeId();
+        TypeId receiverType = receiver.getTypeId();
+        TypeId leftType     = leftOperand.getTypeId();
 
         /*
         ** Check the type of the operands - this function is allowed only on
@@ -510,14 +510,14 @@
     * subquery flattening.
     * NOTE: This is done before the outer ResultSetNode is preprocessed.
     *
-    * @param	numTables			Number of tables in the DML Statement
-    * @param	outerFromList		FromList from outer query block
-    * @param	outerSubqueryList	SubqueryList from outer query block
-    * @param	outerPredicateList	PredicateList from outer query block
+    * @param numTables          Number of tables in the DML Statement
+    * @param outerFromList      FromList from outer query block
+    * @param outerSubqueryList  SubqueryList from outer query block
+    * @param outerPredicateList PredicateList from outer query block
     *
-    * @return		The modified expression
+    * @return The modified expression
     *
-    * @exception StandardException		Thrown on error
+    * @exception StandardException  Thrown on error
     */
     public ValueNode preprocess(
     int             numTables,
@@ -527,7 +527,7 @@
         throws StandardException
     {
         boolean eliminateLikeComparison = false;
-        String	greaterEqualString      = null;
+        String  greaterEqualString      = null;
         String  lessThanString          = null;
 
         /* We must 1st preprocess the component parts */
@@ -612,23 +612,23 @@
          */
 
         /* The transformed tree has to be normalized.  Either:
-         *			AND									AND
-         *		   /   \							   /   \
-         *	     LIKE   AND				OR:			 LIKE	AND
-         *			   /   \							   /   \
-         *			  >=    AND							  >=    TRUE
-         *				   /   \
-         *				  <     TRUE
+         *        AND                   AND
+         *       /   \                 /   \
+         *     LIKE   AND     OR:   LIKE   AND
+         *           /   \                /   \
+         *          >=    AND           >=    TRUE
+         *               /   \
+         *              <     TRUE
          * unless the like string is of the form CONSTANT%, in which
          * case we can do away with the LIKE altogether:
-         *			AND									AND
-         *		   /   \							   /   \
-         *	     >=     AND				OR:			 >=  	TRUE
-         *			   /   \
-         *			  <    TRUE
+         *        AND                   AND
+         *       /   \                 /   \
+         *      >=   AND      OR:     >=  TRUE
+         *          /   \
+         *         <    TRUE
          */
 
-        AndNode	  newAnd   = null;
+        AndNode   newAnd   = null;
         ValueNode trueNode = 
             (ValueNode) getNodeFactory().getNode(
                             C_NodeTypes.BOOLEAN_CONSTANT_NODE,
@@ -726,7 +726,7 @@
         //       >=
         //      /   \
         //  reciever pattern
-		BinaryComparisonOperatorNode greaterEqual = 
+        BinaryComparisonOperatorNode greaterEqual = 
             (BinaryComparisonOperatorNode) getNodeFactory().getNode(
                 C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE,
                 receiver.getClone(), 
@@ -787,13 +787,13 @@
     /**
      * Do code generation for this binary operator.
      *
-     *		This code was copied from BinaryOperatorNode and stripped down
+     * This code was copied from BinaryOperatorNode and stripped down
      *
-     * @param acb	The ExpressionClassBuilder for the class we're generating
-     * @param mb	The method the code to place the code
+     * @param acb   The ExpressionClassBuilder for the class we're generating
+     * @param mb    The method the code to place the code
      *
      *
-     * @exception StandardException		Thrown on error
+     * @exception StandardException Thrown on error
      */
 
     public void generateExpression(
@@ -822,24 +822,26 @@
         ** Generate LHS (field = <receiver operand>). This assignment is
         ** used as the receiver of the method call for this operator.
         **
-        **	(<receiver operand>).method(<left operand>,
-        **                      <right operand>, [<escaperightOp>,]
-        **						<result field>)
+        ** (<receiver operand>).method(
+        **     <left operand>, 
+        **     <right operand>, 
+        **     [<escaperightOp>,] 
+        **     result field>)
         */
 
-        receiver.generateExpression(acb, mb);	// first arg
+        receiver.generateExpression(acb, mb);   // first arg
 
         receiverInterfaceType = receiver.getTypeCompiler().interfaceName();
 
-        mb.upCast(receiverInterfaceType); 		// cast the method instance
+        mb.upCast(receiverInterfaceType);       // cast the method instance
 
         leftOperand.generateExpression(acb, mb);
-        mb.upCast(leftInterfaceType); 			// first arg with cast
+        mb.upCast(leftInterfaceType);           // first arg with cast
 
         if (rightOperand != null)
         {
             rightOperand.generateExpression(acb, mb);
-            mb.upCast(rightInterfaceType); 		// second arg with cast
+            mb.upCast(rightInterfaceType);      // second arg with cast
         }
 
         /* Figure out the result type name */



Mime
View raw message