Author: steve.ebersole(a)jboss.com
Date: 2008-10-08 00:13:07 -0400 (Wed, 08 Oct 2008)
New Revision: 15268
Modified:
core/trunk/core/src/main/antlr/sql-gen.g
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java
Log:
HHH-530 : followup on parameter handling
Modified: core/trunk/core/src/main/antlr/sql-gen.g
===================================================================
--- core/trunk/core/src/main/antlr/sql-gen.g 2008-10-08 04:12:32 UTC (rev 15267)
+++ core/trunk/core/src/main/antlr/sql-gen.g 2008-10-08 04:13:07 UTC (rev 15268)
@@ -213,7 +213,7 @@
| aggregate
| c:constant { out(c); }
| arithmeticExpr
- | PARAM { out("?"); }
+ | param:PARAM { out(param); }
| sn:SQL_NODE { out(sn); }
| { out("("); } selectStatement { out(")"); }
;
Modified:
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java 2008-10-08
04:12:32 UTC (rev 15267)
+++
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java 2008-10-08
04:13:07 UTC (rev 15268)
@@ -45,7 +45,6 @@
import org.hibernate.sql.Select;
import org.hibernate.sql.SelectFragment;
import org.hibernate.util.StringHelper;
-import org.hibernate.util.EmptyIterator;
import antlr.RecognitionException;
import antlr.collections.AST;
Modified:
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java 2008-10-08
04:12:32 UTC (rev 15267)
+++
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java 2008-10-08
04:13:07 UTC (rev 15268)
@@ -131,9 +131,10 @@
try {
try {
ps = session.getBatcher().prepareStatement( idInsertSelect );
- int parameterStart = getWalker().getNumberOfParametersInSetClause();
- List allParams = getIdSelectParameterSpecifications();
- Iterator whereParams = allParams.subList( parameterStart, allParams.size()
).iterator();
+// int parameterStart = getWalker().getNumberOfParametersInSetClause();
+// List allParams = getIdSelectParameterSpecifications();
+// Iterator whereParams = allParams.subList( parameterStart, allParams.size()
).iterator();
+ Iterator whereParams = getIdSelectParameterSpecifications().iterator();
int sum = 1; // jdbc params are 1-based
while ( whereParams.hasNext() ) {
sum += ( ( ParameterSpecification ) whereParams.next() ).bind( ps, parameters,
session, sum );
Show replies by date