db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r541393 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/dictionary/ impl/sql/compile/ impl/sql/conn/ impl/sql/execute/
Date Thu, 24 May 2007 19:08:49 GMT
Author: djd
Date: Thu May 24 12:08:48 2007
New Revision: 541393

URL: http://svn.apache.org/viewvc?view=rev&rev=541393
Log:
DERBY-2661 Remove one use of ExecutionContext and instead obtain the ExecutionFactory directly
for TableDescriptor.getEmptyExecRow.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
Thu May 24 12:08:48 2007
@@ -21,34 +21,21 @@
 
 package org.apache.derby.iapi.sql.dictionary;
 
-import org.apache.derby.iapi.services.context.ContextManager;
-
-import org.apache.derby.iapi.error.StandardException;
-
-import org.apache.derby.iapi.sql.dictionary.GenericDescriptorList;
-
-import org.apache.derby.iapi.sql.depend.Provider;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
 
-import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.catalog.UUID;
+import org.apache.derby.catalog.Dependable;
 import org.apache.derby.catalog.DependableFinder;
+import org.apache.derby.catalog.UUID;
+import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
-import org.apache.derby.iapi.sql.StatementType;
 import org.apache.derby.iapi.services.io.StoredFormatIds;
-
-import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.iapi.sql.StatementType;
 import org.apache.derby.iapi.sql.depend.Provider;
 import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.sql.execute.ExecutionContext;
-
-import org.apache.derby.iapi.reference.SQLState;
-import	org.apache.derby.catalog.Dependable;
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Iterator;
+import org.apache.derby.iapi.types.DataValueDescriptor;
 
 /**
  * This class represents a table descriptor. The external interface to this
@@ -480,17 +467,16 @@
 	/**
 	 * Gets an ExecRow for rows stored in the table this describes.
 	 *
-	 *	@param cm Current ContextManager
 	 *
 	 *	@return	the row.
 	 *  @exception StandardException		Thrown on failure
 	 */
-	public ExecRow getEmptyExecRow( ContextManager cm)
+	public ExecRow getEmptyExecRow()
 		 throws StandardException
 	{
 		int							columnCount = getNumberOfColumns();
-		ExecutionContext			ec = (ExecutionContext) cm.getContext(ExecutionContext.CONTEXT_ID);
-		ExecRow result = ec.getExecutionFactory().getValueRow(columnCount);
+		ExecRow result =
+            getDataDictionary().getExecutionFactory().getValueRow(columnCount);
 
 		for (int index = 0; index < columnCount; index++)
 		{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java Thu
May 24 12:08:48 2007
@@ -270,7 +270,7 @@
 				/*
 				** Construct an empty heap row for use in our constant action.
 				*/
-				emptyHeapRow = targetTableDescriptor.getEmptyExecRow(getContextManager());
+				emptyHeapRow = targetTableDescriptor.getEmptyExecRow();
 
 				/* Generate the RowLocation column */
 				rowLocationNode = (CurrentRowLocationNode) getNodeFactory().getNode(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java Thu
May 24 12:08:48 2007
@@ -483,7 +483,7 @@
 			/*
 			** Construct an empty heap row for use in our constant action.
 			*/
-			emptyHeapRow = targetTableDescriptor.getEmptyExecRow(getContextManager());
+			emptyHeapRow = targetTableDescriptor.getEmptyExecRow();
 
 			/* Append the list of "after" columns to the list of "before" columns,
 			 * preserving the afterColumns list.  (Necessary for binding

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
Thu May 24 12:08:48 2007
@@ -1197,8 +1197,7 @@
 		long conglomId = 
             tran.createConglomerate(
                 "heap", // we're requesting a heap conglomerate
-                td.getEmptyExecRow(
-                    getContextManager()).getRowArray(), // row template
+                td.getEmptyExecRow().getRowArray(), // row template
                 null, //column sort order - not required for heap
                 td.getColumnCollationIds(),  // same ids as old conglomerate
                 null, // properties

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
Thu May 24 12:08:48 2007
@@ -1174,7 +1174,7 @@
 				"constraintActions expected to be null");
 		}
 
-		ExecRow emptyHeapRow  = td.getEmptyExecRow(lcc.getContextManager());
+		ExecRow emptyHeapRow  = td.getEmptyExecRow();
         int[]   collation_ids = td.getColumnCollationIds();
 
 		compressHeapCC = 
@@ -1249,7 +1249,7 @@
 		for (int i = 0; i < bulkFetchSize; i++)
 		{
 			// create a base row template
-			baseRow[i] = td.getEmptyExecRow(lcc.getContextManager());
+			baseRow[i] = td.getEmptyExecRow();
 			baseRowArray[i] = baseRow[i].getRowArray();
 			compressRL[i] = compressHeapGSC.newRowLocationTemplate();
 		}
@@ -1397,7 +1397,7 @@
 		}
 
 		//gather information from the existing conglomerate to create new one.
-		emptyHeapRow = td.getEmptyExecRow(lcc.getContextManager());
+		emptyHeapRow = td.getEmptyExecRow();
 		compressHeapCC = tc.openConglomerate(
 								td.getHeapConglomerateId(),
                                 false,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java
Thu May 24 12:08:48 2007
@@ -366,7 +366,7 @@
 		IndexRowGenerator irg = fk.getIndexConglomerateDescriptor(dd).getIndexDescriptor();	
 		ExecIndexRow indexTemplateRow = irg.getIndexRowTemplate();
 		TableDescriptor td = fk.getTableDescriptor();
-		ExecRow baseRow = td.getEmptyExecRow(cm);
+		ExecRow baseRow = td.getEmptyExecRow();
 		irg.getIndexRow(baseRow, getRowLocation(dd, td, tc), 
 								indexTemplateRow, (FormatableBitSet)null);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java?view=diff&rev=541393&r1=541392&r2=541393
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java
Thu May 24 12:08:48 2007
@@ -39,7 +39,6 @@
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
 import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.sql.execute.ExecutionContext;
 import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo;
 
 
@@ -322,7 +321,7 @@
 	
 			td = dd.getTableDescriptor(targetUUID);
 	
-			emptyHeapRow = td.getEmptyExecRow(lcc.getContextManager());
+			emptyHeapRow = td.getEmptyExecRow();
 		}
 
 		return emptyHeapRow.getClone();



Mime
View raw message