db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r477371 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/
Date Mon, 20 Nov 2006 22:32:54 GMT
Author: djd
Date: Mon Nov 20 14:32:53 2006
New Revision: 477371

URL: http://svn.apache.org/viewvc?view=rev&rev=477371
Log:
DERBY-2096 (partial) Rename the bind() method for StatementNode to bindStatement() as a step
in switching the return type of a parse statement to StatementNode. Make bindStatement() void
as no implementation ever switches the type and several implementations did not handle the
type switching anyway.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.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/DMLStatementNode.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/DropAliasNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropIndexNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSchemaNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTriggerNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InsertNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LockTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NOPStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RenameNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
Mon Nov 20 14:32:53 2006
@@ -208,11 +208,10 @@
 	 * For example, verifying that the user is not trying to add a 
 	 * non-nullable column.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		DataDictionary	dd = getDataDictionary();
 		int					numCheckConstraints = 0;
@@ -308,8 +307,6 @@
 		 * execution.
 		 */
 		getCompilerContext().createDependency(baseTable);
-
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java
Mon Nov 20 14:32:53 2006
@@ -150,12 +150,11 @@
 	 * Binding an update will also massage the tree so that
 	 * the ResultSetNode has a single column, the RID.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		DataDictionary dd = getDataDictionary();
 
@@ -176,7 +175,6 @@
   		checkReliability();
 
 		getCompilerContext().popCurrentPrivType();
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
Mon Nov 20 14:32:53 2006
@@ -240,17 +240,16 @@
 	 * For example, verifying that the column name list does not
 	 * contain any duplicate column names.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		// Procedures and functions do not check class or method validity until
 		// runtime execution. Synonyms do need some validity checks.
 		if (aliasType != AliasInfo.ALIAS_TYPE_SYNONYM_AS_CHAR)
-			return this;
+			return;
 
 		// Don't allow creating synonyms in SESSION schema. Causes confusion if
 		// a temporary table is created later with same name.
@@ -268,7 +267,6 @@
 		if ((targetSD != null) && isSessionSchema(targetSD))
 			throw StandardException.newException(SQLState.LANG_OPERATION_NOT_ALLOWED_ON_SESSION_SCHEMA_TABLES);
 
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
Mon Nov 20 14:32:53 2006
@@ -160,12 +160,10 @@
 	 * For example, verifying that the column name list does not
 	 * contain any duplicate column names.
 	 *
-	 * @return	The bound query tree
-	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext			cc = getCompilerContext();
 		DataDictionary			dd = getDataDictionary();
@@ -241,7 +239,6 @@
 		/* Statement is dependent on the TableDescriptor */
 		getCompilerContext().createDependency(td);
 
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java
Mon Nov 20 14:32:53 2006
@@ -106,15 +106,12 @@
 	 * Bind this createSchemaNode. Main work is to create a StatementPermission
 	 * object to require CREATE_SCHEMA_PRIV at execution time.
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
-		super.bind();
-
 		CompilerContext cc = getCompilerContext();
 		if (isPrivilegeCollectionRequired())
 			cc.addRequiredSchemaPriv(name, aid, Authorizer.CREATE_SCHEMA_PRIV);
 
-		return this;
 	}
 	
 	public String statementToString()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java
Mon Nov 20 14:32:53 2006
@@ -197,12 +197,11 @@
 	 * done before actually creating the base table or declaring the global temporary table.
 	 * For eg, verifying that the TableElementList does not contain any duplicate column names.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		DataDictionary	dataDictionary = getDataDictionary();
 		int numPrimaryKeys = 0;
@@ -289,8 +288,6 @@
 			 */
 			tableElementList.bindAndValidateCheckConstraints(fromList);
 		}
-
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
Mon Nov 20 14:32:53 2006
@@ -215,11 +215,10 @@
 	 * Bind this CreateTriggerNode.  This means doing any static error
 	 * checking that can be done before actually creating the table.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext compilerContext = getCompilerContext();
 		DataDictionary	dd = getDataDictionary();
@@ -335,7 +334,6 @@
 		if (actionNode.referencesSessionSchema())
 			throw StandardException.newException(SQLState.LANG_OPERATION_NOT_ALLOWED_ON_SESSION_SCHEMA_TABLES);
 
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
Mon Nov 20 14:32:53 2006
@@ -167,11 +167,10 @@
 	 * For example, verifying that the ResultColumnList does not
 	 * contain any duplicate column names.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext				cc = getCompilerContext();
 		DataDictionary				dataDictionary = getDataDictionary();
@@ -224,8 +223,6 @@
 		// for each column, stuff system.column
 		colInfos = new ColumnInfo[queryExpression.getResultColumns().size()];
 		genColumnInfos(colInfos);
-
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java Mon
Nov 20 14:32:53 2006
@@ -214,12 +214,11 @@
 	 * etc. It also includes determining whether an UNSPECIFIED cursor
 	 * is updatable or not, and verifying that an UPDATE cursor actually is.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		DataDictionary				dataDictionary;
 
@@ -362,7 +361,6 @@
 				indexOfSessionTableNamesInSavedObjects = getCompilerContext().addSavedObject(sessionSchemaTableNames);
 		}
 
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java
Mon Nov 20 14:32:53 2006
@@ -353,7 +353,7 @@
 	  *
 	  *	@exception StandardException		Thrown on error
 	  */
-	public	void	bindName( DataDictionary	dataDictionary )
+	void	bindName( DataDictionary	dataDictionary )
 		                       throws StandardException
 	{
 		if (objectName != null)

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?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- 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
Mon Nov 20 14:32:53 2006
@@ -460,7 +460,7 @@
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public	ValueNode bindConstraints
+	ValueNode bindConstraints
 	(
 		DataDictionary		dataDictionary,
 		NodeFactory			nodeFactory,
@@ -531,7 +531,7 @@
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public	void	bindCheckConstraint
+	void	bindCheckConstraint
 	(
 		NodeFactory			nodeFactory,
 		TableDescriptor		targetTableDescriptor,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLStatementNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLStatementNode.java
Mon Nov 20 14:32:53 2006
@@ -146,7 +146,7 @@
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind(DataDictionary dataDictionary)
+	QueryTreeNode bind(DataDictionary dataDictionary)
 					 throws StandardException
 	{
 		// We just need select privilege on most columns and tables

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=477371&r1=477370&r2=477371
==============================================================================
--- 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 Mon
Nov 20 14:32:53 2006
@@ -140,12 +140,11 @@
 	 * delete will also massage the tree so that the ResultSetNode has 
 	 * column containing the RowLocation of the base row.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		// We just need select privilege on the where clause tables
 		getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV);
@@ -403,7 +402,6 @@
 		{
 			getCompilerContext().popCurrentPrivType();
 		}
-		return this;
 	} // end of bind
 
 	int getPrivType()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java Mon
Nov 20 14:32:53 2006
@@ -98,11 +98,10 @@
 	/**
 	 * Bind this DropMethodAliasNode.  
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		DataDictionary	dataDictionary = getDataDictionary();
 		String			aliasName = getRelativeName();
@@ -125,7 +124,6 @@
 			throw StandardException.newException(SQLState.LANG_CANNOT_DROP_SYSTEM_ALIASES, aliasName);
 		}
 
-		return this;
 	}
 
 	// inherit generate() method from DDLStatementNode

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropIndexNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropIndexNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropIndexNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropIndexNode.java Mon
Nov 20 14:32:53 2006
@@ -61,11 +61,10 @@
 	 * Bind this DropIndexNode.  This means looking up the index,
 	 * verifying it exists and getting the conglomerate number.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext			cc = getCompilerContext();
 		DataDictionary			dd = getDataDictionary();
@@ -107,8 +106,6 @@
 		/* Statement is dependent on the TableDescriptor and ConglomerateDescriptor */
 		cc.createDependency(td);
 		cc.createDependency(cd);
-
-		return this;
 	}
 
 	// inherit generate() method from DDLStatementNode

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSchemaNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSchemaNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSchemaNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSchemaNode.java
Mon Nov 20 14:32:53 2006
@@ -58,7 +58,7 @@
 		this.dropBehavior = ((Integer) dropBehavior).intValue();
 	}
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		
         LanguageConnectionContext lcc = getLanguageConnectionContext();
@@ -84,8 +84,6 @@
                 lcc.getAuthorizationId(), 
                 Authorizer.DROP_SCHEMA_PRIV);
         }
-        
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTableNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTableNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTableNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTableNode.java Mon
Nov 20 14:32:53 2006
@@ -103,12 +103,11 @@
 	 * Bind this LockTableNode.  This means looking up the table,
 	 * verifying it exists and getting the heap conglomerate number.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext			cc = getCompilerContext();
 
@@ -122,8 +121,6 @@
 		/* Statement is dependent on the TableDescriptor and ConglomerateDescriptor */
 		cc.createDependency(td);
 		cc.createDependency(cd);
-
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTriggerNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTriggerNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTriggerNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTriggerNode.java
Mon Nov 20 14:32:53 2006
@@ -51,11 +51,10 @@
 	 * Bind this DropTriggerNode.  This means looking up the trigger,
 	 * verifying it exists and getting its table uuid.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext			cc = getCompilerContext();
 		DataDictionary			dd = getDataDictionary();
@@ -76,8 +75,6 @@
 		td = triggerDescriptor.getTableDescriptor();
 		cc.createDependency(td);
 		cc.createDependency(triggerDescriptor);
-			
-		return this;
 	}
 
 	// inherit generate() method from DDLStatementNode

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java Mon
Nov 20 14:32:53 2006
@@ -68,12 +68,11 @@
  	/**
  	 *  Bind the drop view node
  	 *
- 	 * @return	The bound query tree
  	 *
  	 * @exception StandardException		Thrown on error
  	 */
 	
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		DataDictionary dd = getDataDictionary();
 		CompilerContext cc = getCompilerContext();
@@ -90,8 +89,6 @@
 		{
 			cc.createDependency(td);
 		}
-			
-		return this;
 	}
 		
 	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java Mon
Nov 20 14:32:53 2006
@@ -94,7 +94,7 @@
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		/*
 		** Grab the compiler context each time we bind just
@@ -132,7 +132,6 @@
 		*/
 		getCompilerContext().createDependency(spsd);
 
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java Mon Nov
20 14:32:53 2006
@@ -88,14 +88,12 @@
 	/**
 	 * Bind this GrantNode. Resolve all table, column, and routine references.
 	 *
-	 * @return the bound GrantNode
 	 *
 	 * @exception StandardException	Standard error policy.
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, true);
-		return this;
 	} // end of bind
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InsertNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InsertNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InsertNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InsertNode.java Mon
Nov 20 14:32:53 2006
@@ -220,12 +220,11 @@
 	 * the collist and select column order/number are the
 	 * same as the layout of the table in the store. 
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		// We just need select privilege on the expressions
 		getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV);
@@ -528,7 +527,6 @@
 		}
         
 		getCompilerContext().popCurrentPrivType();
-		return this;
 	}
 
 	int getPrivType()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LockTableNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LockTableNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LockTableNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LockTableNode.java Mon
Nov 20 14:32:53 2006
@@ -107,12 +107,11 @@
 	 * Bind this LockTableNode.  This means looking up the table,
 	 * verifying it exists and getting the heap conglomerate number.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext			cc = getCompilerContext();
 		ConglomerateDescriptor	cd;
@@ -167,8 +166,6 @@
 			cc.addRequiredTablePriv(lockTableDescriptor);
 			cc.popCurrentPrivType();
 		}
-
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NOPStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NOPStatementNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NOPStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NOPStatementNode.java
Mon Nov 20 14:32:53 2006
@@ -44,11 +44,10 @@
 	 * Bind this NOP statement.  This throws an exception, because NOP
 	 * statements by definition stop after parsing.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Always thrown to stop after parsing
 	 */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		/*
 		** Prevent this statement from getting to execution by throwing

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RenameNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RenameNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RenameNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RenameNode.java Mon
Nov 20 14:32:53 2006
@@ -224,12 +224,10 @@
 	 * verifying it's not a system table, verifying it's not view, verifying
 	 * the from index exists, verifying the to index doesn't exist.
 	 *
-	 * @return	The bound query tree
-	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		CompilerContext			cc = getCompilerContext();
 		DataDictionary			dd = getDataDictionary();
@@ -308,8 +306,6 @@
 		/* Statement is dependent on the TableDescriptor and ConglomerateDescriptor */
 		cc.createDependency(td);
 		cc.createDependency(cd);
-
-		return this;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java?view=diff&rev=477371&r1=477370&r2=477371
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java Mon
Nov 20 14:32:53 2006
@@ -88,14 +88,12 @@
     /**
      * Bind this RevokeNode. Resolve all table, column, and routine references.
      *
-     * @return the bound RevokeNode
      *
      * @exception StandardException	Standard error policy.
      */
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
         privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, false);
-        return this;
     } // end of bind
 
 

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=477371&r1=477370&r2=477371
==============================================================================
--- 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 Mon
Nov 20 14:32:53 2006
@@ -98,6 +98,33 @@
 	}
 
 	public abstract String statementToString();
+	
+	/**
+	 * Perform the binding operation statement.  Binding consists of
+	 * permissions checking, view resolution, datatype resolution, and
+	 * creation of a dependency list (for determining whether a tree or
+	 * plan is still up to date).
+	 *
+	 * This bindStatement() method does nothing. 
+	 * Each StatementNode type that can appear
+	 * at the top of a tree can override this method with its
+	 * own bindStatement() method that does "something".
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+
+	public void bindStatement() throws StandardException
+	{
+	}
+	
+	// TEMP map QueryTreeNode.bind() onto bindStatement()
+	// for StatementNode. Part of incremental development
+	// in switching the api for a compiled statement to
+	// be StatementNode.
+	public final QueryTreeNode bind() throws StandardException {
+		bindStatement();
+		return this;
+	}
 
 	/**
 	 * create the outer shell class builder for the class we will

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=477371&r1=477370&r2=477371
==============================================================================
--- 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 Mon
Nov 20 14:32:53 2006
@@ -180,12 +180,11 @@
 	 * value, followed by a column to contain the RowLocation of the
 	 * row to be updated.
 	 *
-	 * @return	The bound query tree
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
 
-	public QueryTreeNode bind() throws StandardException
+	public void bindStatement() throws StandardException
 	{
 		// We just need select privilege on the expressions
 		getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV);
@@ -614,7 +613,6 @@
 
 		getCompilerContext().popCurrentPrivType();		
 
-		return this;
 	} // end of bind()
 
 	int getPrivType()



Mime
View raw message