You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2006/12/01 23:00:55 UTC
svn commit: r481421 - in
/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile:
QueryTreeNode.java StatementNode.java
Author: djd
Date: Fri Dec 1 14:00:54 2006
New Revision: 481421
URL: http://svn.apache.org/viewvc?view=rev&rev=481421
Log:
DERBY-2096 Move remaining methods that are limited to StatementNode from QueryTreeNode.
Modified:
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/StatementNode.java
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?view=diff&rev=481421&r1=481420&r2=481421
==============================================================================
--- 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 Fri Dec 1 14:00:54 2006
@@ -210,18 +210,6 @@
}
/**
- * Get the name of the SPS that is used
- * to execute this statement. Only relevant
- * for an ExecSPSNode -- otherwise, returns null.
- *
- * @return the name of the underlying sps
- */
- public String getSPSName()
- {
- return null;
- }
-
- /**
* Gets the beginning offset of the SQL substring which this
* query node represents.
*
@@ -555,27 +543,6 @@
}
/**
- * this implementation of generate() is
- * a place-holder until all of the nodes that need to,
- * implement it. Only the root, statement nodes
- * implement this flavor of generate; the other nodes
- * will implement the version that returns Generators
- * and takes an activation class builder as an
- * argument.
- *
- * @param ignored - ignored (he he)
- *
- * @return A GeneratedClass for this statement
- *
- * @exception StandardException Thrown on error
- */
- public GeneratedClass generate(ByteArray ignored) throws StandardException
- {
- throw StandardException.newException(SQLState.LANG_UNABLE_TO_GENERATE,
- this.nodeHeader());
- }
-
- /**
* Do the code generation for this node. This is a place-holder
* method - it should be over-ridden in the sub-classes.
*
@@ -595,21 +562,6 @@
}
/**
- * Only DML statements have result descriptions - for all others
- * return null. This method is overridden in DMLStatementNode.
- *
- * @return null
- *
- * @exception StandardException never actually thrown here,
- * but thrown by subclasses
- */
- public ResultDescription makeResultDescription()
- throws StandardException
- {
- return null;
- }
-
- /**
* Parameter info is stored in the compiler context.
* Hide this from the callers.
*
@@ -635,28 +587,6 @@
public ConstantAction makeConstantAction() throws StandardException
{
return null;
- }
-
-
-
- /**
- * Returns the name of statement in EXECUTE STATEMENT command.
- * Returns null for all other commands.
- * @return String null unless overridden for Execute Statement command
- */
- public String executeStatementName()
- {
- return null;
- }
-
- /**
- * Returns name of schema in EXECUTE STATEMENT command.
- * Returns null for all other commands.
- * @return String schema for EXECUTE STATEMENT null for all others
- */
- public String executeSchemaName()
- {
- return null;
}
/**
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StatementNode.java?view=diff&rev=481421&r1=481420&r2=481421
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StatementNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StatementNode.java Fri Dec 1 14:00:54 2006
@@ -25,6 +25,7 @@
import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.sql.ResultDescription;
import org.apache.derby.iapi.sql.compile.CompilerContext;
import org.apache.derby.iapi.sql.compile.Parser;
import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
@@ -96,12 +97,53 @@
{
return true;
}
+
+ /**
+ * Get the name of the SPS that is used to execute this statement. Only
+ * relevant for an ExecSPSNode -- otherwise, returns null.
+ *
+ * @return the name of the underlying sps
+ */
+ public String getSPSName() {
+ return null;
+ }
/**
- * Convert this object to a String. See comments in QueryTreeNode.java
- * for how this should be done for tree printing.
- *
- * @return This object as a String
+ * Returns the name of statement in EXECUTE STATEMENT command. Returns null
+ * for all other commands.
+ *
+ * @return String null unless overridden for Execute Statement command
+ */
+ public String executeStatementName() {
+ return null;
+ }
+
+ /**
+ * Returns name of schema in EXECUTE STATEMENT command. Returns null for all
+ * other commands.
+ *
+ * @return String schema for EXECUTE STATEMENT null for all others
+ */
+ public String executeSchemaName() {
+ return null;
+ }
+
+ /**
+ * Only DML statements have result descriptions - for all others return
+ * null. This method is overridden in DMLStatementNode.
+ *
+ * @return null
+ *
+ */
+ public ResultDescription makeResultDescription() {
+ return null;
+ }
+
+ /**
+ * Convert this object to a String. See comments in QueryTreeNode.java for
+ * how this should be done for tree printing.
+ *
+ * @return This object as a String
*/
public String toString()