db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1575032 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile: DMLModStatementNode.java MatchingClauseNode.java MergeNode.java
Date Thu, 06 Mar 2014 20:36:09 GMT
Author: rhillegas
Date: Thu Mar  6 20:36:09 2014
New Revision: 1575032

URL: http://svn.apache.org/r1575032
Log:
DERBY-3155: Implement printSubNodes() for MergeNode and MatchingClauseNode; commit derby-3155-37-aa-printSubNodes.diff.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=1575032&r1=1575031&r2=1575032&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
Thu Mar  6 20:36:09 2014
@@ -1947,8 +1947,11 @@ abstract class DMLModStatementNode exten
 		{
 			super.printSubNodes(depth);
 
-			printLabel(depth, "targetTableName: ");
-			targetTableName.treePrint(depth + 1);
+            if ( targetTableName != null )
+            {
+                printLabel(depth, "targetTableName: ");
+                targetTableName.treePrint(depth + 1);
+            }
 
 			if (resultColumnList != null)
 			{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java?rev=1575032&r1=1575031&r2=1575032&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java
Thu Mar  6 20:36:09 2014
@@ -1564,6 +1564,45 @@ public class MatchingClauseNode extends 
 	}
 
 	/**
+	 * Prints the sub-nodes of this object.  See QueryTreeNode.java for
+	 * how tree printing is supposed to work.
+	 *
+	 * @param depth		The depth of this node in the tree
+	 */
+    @Override
+    void printSubNodes( int depth )
+	{
+		if (SanityManager.DEBUG)
+		{
+			super.printSubNodes( depth );
+
+            if ( _matchingRefinement != null )
+            {
+                printLabel( depth, "matchingRefinement: " );
+                _matchingRefinement.treePrint( depth + 1 );
+            }
+
+            if ( _updateColumns != null )
+            {
+                printLabel( depth, "updateColumns: " );
+                _updateColumns.treePrint( depth + 1 );
+            }
+
+            if ( _insertColumns != null )
+            {
+                printLabel( depth, "insertColumns: " );
+                _insertColumns.treePrint( depth + 1 );
+            }
+
+            if ( _insertValues != null )
+            {
+                printLabel( depth, "insertValues: " );
+                _insertValues.treePrint( depth + 1 );
+            }
+		}
+	}
+
+	/**
 	 * Convert this object to a String.  See comments in QueryTreeNode.java
 	 * for how this should be done for tree printing.
 	 *

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java?rev=1575032&r1=1575031&r2=1575032&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java Thu Mar
 6 20:36:09 2014
@@ -972,6 +972,39 @@ public final class MergeNode extends DML
         }
 	}
 
+	/**
+	 * Prints the sub-nodes of this object.  See QueryTreeNode.java for
+	 * how tree printing is supposed to work.
+	 *
+	 * @param depth		The depth of this node in the tree
+	 */
+    @Override
+    void printSubNodes( int depth )
+	{
+		if (SanityManager.DEBUG)
+		{
+			super.printSubNodes( depth );
+
+            printLabel( depth, "targetTable: " );
+            _targetTable.treePrint( depth + 1 );
+
+            printLabel( depth, "sourceTable: " );
+            _sourceTable.treePrint( depth + 1 );
+
+            if ( _searchCondition != null )
+            {
+                printLabel( depth, "searchCondition: " );
+                _searchCondition.treePrint( depth + 1 );
+            }
+
+            for ( MatchingClauseNode mcn : _matchingClauses )
+            {
+                printLabel( depth, mcn.toString() );
+                mcn.treePrint( depth + 1 );
+            }
+		}
+	}
+
     @Override
     String statementToString()
 	{



Mime
View raw message