db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1196560 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/sql/compile/ engine/org/apache/derby/iapi/sql/dictionary/ engine/org/apache/derby/impl/sql/ engine/org/apache/derby/impl/sql/catalog/ engine/org/apache/derby/impl/sql/com...
Date Wed, 02 Nov 2011 13:03:52 GMT
Author: kahatlen
Date: Wed Nov  2 13:03:52 2011
New Revision: 1196560

URL: http://svn.apache.org/viewvc?rev=1196560&view=rev
Log:
DERBY-4845: Improve the dependency tracking for our build targets

Don't use impl class StatementNode in iapi classes.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Parser.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    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/DefaultNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
    db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Parser.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Parser.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Parser.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Parser.java Wed Nov
 2 13:03:52 2011
@@ -23,12 +23,6 @@ package org.apache.derby.iapi.sql.compil
 
 import org.apache.derby.iapi.error.StandardException;
 
-/* Strictly speaking we shouldn't import classes under the impl hierarchy here
- * but this is work in progress.
- * manish - Wed Mar 28 13:05:19 PST 2001
- */
-import org.apache.derby.impl.sql.compile.StatementNode;
-
 /**
  * The Parser interface is intended to work with Jack-generated parsers (now JavaCC).
  * We will specify "STATIC=false" when building Jack parsers - this specifies
@@ -56,12 +50,12 @@ public interface Parser
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public StatementNode	parseStatement(String statementSQLText,
+	public Visitable parseStatement(String statementSQLText,
 		Object[] paramDefaults) 
 		throws StandardException;
 
 
-	public StatementNode parseStatement(String statementSQLText)
+	public Visitable parseStatement(String statementSQLText)
 		throws StandardException;
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
Wed Nov  2 13:03:52 2011
@@ -28,6 +28,7 @@ import org.apache.derby.iapi.types.DataT
 import org.apache.derby.iapi.types.NumberDataValue;
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.services.daemon.IndexStatisticsDaemon;
+import org.apache.derby.iapi.sql.compile.Visitable;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.error.StandardException;
@@ -38,8 +39,6 @@ import org.apache.derby.catalog.TypeDesc
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
 
-import org.apache.derby.impl.sql.compile.StatementNode;
-
 import java.sql.Types;
 import java.util.List;
 import java.util.Hashtable;
@@ -1290,7 +1289,7 @@ public interface DataDictionary
 	 * @throws StandardException
 	 */
 	public String getTriggerActionString(
-			StatementNode actionStmt,
+			Visitable actionStmt,
 			String oldReferencingName,
 			String newReferencingName,
 			String triggerDefinition,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java
Wed Nov  2 13:03:52 2011
@@ -41,7 +41,7 @@ import org.apache.derby.iapi.services.co
 
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.Parser;
-import org.apache.derby.impl.sql.compile.StatementNode;
+import org.apache.derby.iapi.sql.compile.Visitable;
 
 import java.io.ObjectOutput;
 import java.io.ObjectInput;
@@ -370,7 +370,7 @@ public class TriggerDescriptor extends T
 			compSchema = getDataDictionary().getSchemaDescriptor(triggerSchemaId, null);
 			CompilerContext newCC = lcc.pushCompilerContext(compSchema);
 			Parser	pa = newCC.getParser();
-			StatementNode stmtnode = (StatementNode)pa.parseStatement(triggerDefinition);
+			Visitable stmtnode = pa.parseStatement(triggerDefinition);
 			lcc.popCompilerContext(newCC);
 					
 			actionSPS.setText(getDataDictionary().getTriggerActionString(stmtnode, 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java Wed Nov
 2 13:03:52 2011
@@ -327,7 +327,8 @@ public class GenericStatement
 
 				//Only top level statements go through here, nested statement
 				//will invoke this method from other places
-				StatementNode qt = p.parseStatement(statementText, paramDefaults);
+				StatementNode qt = (StatementNode)
+                        p.parseStatement(statementText, paramDefaults);
 
 				parseTime = getCurrentTimeMillis(lcc);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Wed Nov  2 13:03:52 2011
@@ -27,6 +27,7 @@ import org.apache.derby.iapi.reference.J
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.Limits;
+import org.apache.derby.iapi.sql.compile.Visitable;
 import org.apache.derby.iapi.sql.conn.Authorizer;
 
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
@@ -72,9 +73,6 @@ import org.apache.derby.iapi.sql.depend.
 
 import org.apache.derby.impl.sql.compile.CollectNodesVisitor;
 import org.apache.derby.impl.sql.compile.ColumnReference;
-import org.apache.derby.impl.sql.compile.FromBaseTable;
-import org.apache.derby.impl.sql.compile.QueryTreeNode;
-import org.apache.derby.impl.sql.compile.StatementNode;
 import org.apache.derby.impl.sql.compile.TableName;
 import org.apache.derby.impl.sql.depend.BasicDependencyManager;
 
@@ -4750,7 +4748,7 @@ public final class	DataDictionaryImpl
 	 * @throws StandardException
 	 */
 	public String getTriggerActionString(
-			StatementNode actionStmt,
+			Visitable actionStmt,
 			String oldReferencingName,
 			String newReferencingName,
 			String triggerDefinition,

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=1196560&r1=1196559&r2=1196560&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
Wed Nov  2 13:03:52 2011
@@ -21,10 +21,8 @@
 
 package	org.apache.derby.impl.sql.compile;
 
-import java.lang.reflect.Modifier;
 import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.HashSet;
 import java.util.Vector;
 
 import org.apache.derby.catalog.DefaultInfo;
@@ -546,7 +544,7 @@ abstract class DMLModStatementNode exten
 		/* Finally, we can call the parser */
 		// Since this is always nested inside another SQL statement, so topLevel flag
 		// should be false
-		StatementNode qt = p.parseStatement(select);
+		Visitable qt = p.parseStatement(select);
 		if (SanityManager.DEBUG)
 		{
 			if (! (qt instanceof CursorNode))
@@ -1394,7 +1392,7 @@ abstract class DMLModStatementNode exten
 		/* Finally, we can call the parser */
 		// Since this is always nested inside another SQL statement, so topLevel flag
 		// should be false
-		StatementNode qt = p.parseStatement(select);
+		Visitable qt = p.parseStatement(select);
 		if (SanityManager.DEBUG)
 		{
 			if (! (qt instanceof CursorNode))

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java Wed
Nov  2 13:03:52 2011
@@ -21,8 +21,6 @@
 
 package	org.apache.derby.impl.sql.compile;
 
-import org.apache.derby.iapi.services.context.ContextManager;
-
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -30,20 +28,16 @@ import org.apache.derby.iapi.services.sa
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.Parser;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
+import org.apache.derby.iapi.sql.compile.Visitable;
 
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
 
-import org.apache.derby.iapi.types.TypeId;
-
 import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;
-import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 import org.apache.derby.iapi.sql.dictionary.DefaultDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 
 import org.apache.derby.iapi.error.StandardException;
 
-import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
-
 import org.apache.derby.catalog.types.DefaultInfoImpl;
 
 import java.util.Vector;
@@ -256,7 +250,7 @@ public  class DefaultNode extends ValueN
 		/* Finally, we can call the parser */
 		// Since this is always nested inside another SQL statement, so topLevel flag
 		// should be false
-		StatementNode qt = p.parseStatement(values);
+		Visitable qt = p.parseStatement(values);
 		if (SanityManager.DEBUG)
 		{
 			if (! (qt instanceof CursorNode))

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java Wed
Nov  2 13:03:52 2011
@@ -21,14 +21,12 @@
 
 package org.apache.derby.impl.sql.compile;
 
-import org.apache.derby.impl.sql.compile.QueryTreeNode;
-import org.apache.derby.iapi.sql.compile.Parser;
-import org.apache.derby.iapi.sql.Statement;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
+import org.apache.derby.iapi.sql.compile.Parser;
+import org.apache.derby.iapi.sql.compile.Visitable;
 
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.services.sanity.SanityManager;
 
 public class ParserImpl implements Parser
 {
@@ -73,7 +71,7 @@ public class ParserImpl implements Parse
 		this.cc = cc;
 	}
 
-	public StatementNode parseStatement(String statementSQLText) 
+	public Visitable parseStatement(String statementSQLText)
 		throws StandardException
 	{
 		return parseStatement(statementSQLText, (Object[])null);
@@ -126,7 +124,7 @@ public class ParserImpl implements Parse
 	 * @exception StandardException	Thrown on error
 	 */
 
-	public StatementNode parseStatement(String statementSQLText, Object[] paramDefaults) 
+	public Visitable parseStatement(String statementSQLText, Object[] paramDefaults)
 		throws StandardException
 	{
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java Wed
Nov  2 13:03:52 2011
@@ -37,7 +37,6 @@ import org.apache.derby.iapi.reference.S
 import org.apache.derby.iapi.services.classfile.VMOpcode;
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
-import org.apache.derby.iapi.services.io.StoredFormatIds;
 import org.apache.derby.iapi.services.loader.ClassFactory;
 import org.apache.derby.iapi.services.loader.ClassInspector;
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -783,7 +782,7 @@ public abstract class QueryTreeNode impl
 		try
 		{
 			Parser p = newCC.getParser();
-			return p.parseStatement(sql);
+			return (StatementNode) p.parseStatement(sql);
 		}
 
 		finally

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java Wed
Nov  2 13:03:52 2011
@@ -21,8 +21,6 @@
 
 package	org.apache.derby.impl.sql.compile;
 
-import org.apache.derby.iapi.services.context.ContextManager;
-
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.CostEstimate;
@@ -34,7 +32,6 @@ import org.apache.derby.iapi.sql.compile
 import org.apache.derby.iapi.sql.compile.Visitable;
 import org.apache.derby.iapi.sql.compile.Visitor;
 import org.apache.derby.iapi.sql.compile.RequiredRowOrdering;
-import org.apache.derby.iapi.sql.compile.RowOrdering;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
@@ -44,35 +41,22 @@ import org.apache.derby.iapi.sql.diction
 import org.apache.derby.iapi.sql.dictionary.DefaultDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 
-import org.apache.derby.iapi.sql.execute.ExecutionContext;
-
-import org.apache.derby.iapi.sql.Activation;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
-import org.apache.derby.iapi.types.StringDataValue;
 import org.apache.derby.iapi.sql.ResultColumnDescriptor;
 import org.apache.derby.iapi.sql.ResultDescription;
-import org.apache.derby.iapi.sql.ResultSet;
-
-import org.apache.derby.iapi.types.TypeId;
 
 import org.apache.derby.iapi.store.access.TransactionController;
 
-import org.apache.derby.iapi.services.loader.GeneratedMethod;
-
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.reference.ClassName;
 
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 
-import org.apache.derby.impl.sql.compile.ActivationClassBuilder;
-import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
-
 import org.apache.derby.iapi.util.JBitSet;
 import org.apache.derby.iapi.services.classfile.VMOpcode;
 
 import org.apache.derby.catalog.types.DefaultInfoImpl;
 
-import java.util.Properties;
 import java.util.Vector;
 import java.util.Set;
 
@@ -1242,7 +1226,7 @@ public abstract class ResultSetNode exte
 		/* Finally, we can call the parser */
 		// Since this is always nested inside another SQL statement, so topLevel flag
 		// should be false
-		StatementNode qt = p.parseStatement(values);
+		Visitable qt = p.parseStatement(values);
 		if (SanityManager.DEBUG)
 		{
 			if (! (qt instanceof CursorNode))

Modified: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java?rev=1196560&r1=1196559&r2=1196560&view=diff
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
(original)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
Wed Nov  2 13:03:52 2011
@@ -32,6 +32,7 @@ import org.apache.derby.iapi.services.da
 import org.apache.derby.iapi.services.monitor.ModuleSupportable;
 import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
+import org.apache.derby.iapi.sql.compile.Visitable;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
 import org.apache.derby.iapi.sql.depend.DependencyManager;
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
@@ -65,7 +66,6 @@ import org.apache.derby.iapi.types.DataT
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.NumberDataValue;
 import org.apache.derby.iapi.types.RowLocation;
-import org.apache.derby.impl.sql.compile.StatementNode;
 
 /**
  * DataDictionary implementation that does nothing!
@@ -489,7 +489,7 @@ public class EmptyDictionary implements 
 	}
 
 	public String getTriggerActionString(
-			StatementNode actionStmt,
+			Visitable actionStmt,
 			String oldReferencingName,
 			String newReferencingName,
 			String triggerDefinition,



Mime
View raw message