Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/DBWS/SQLBatchOperations"

(Batch SQL operations)
(Batch SQL operations)
Line 23: Line 23:
 
</batch-sql>
 
</batch-sql>
 
</source>
 
</source>
* need to figure out 2 types of variables:
+
=== Variable bindings ===
*# parameters passed in (use JDBC '?' markers?)
+
Need to figure out 2 types of variables:
*# temporary variables (@A)
+
# parameters passed in (use JDBC '?' markers?)
 +
# temporary variables (@A)
 +
 
 +
=== Transaction Horizon
 +
* explicit (see above)
 +
* implicit - whole block is implicitly a start ... commit transaction
 +
* nesting - can <tt>batch-sql</tt> operations be batched together: what then happens to the transaction horizon?

Revision as of 10:54, 7 October 2010


Batch SQL operations

Initial contribution by customer Rainer Schild: A DBWSBuilder file that looks something like:

<batch-sql
  name="do_trace_analysis"
  lineDelimiter=";"
  >
  <text>
    <![CDATA[
      START TRANSACTION;
      SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
      UPDATE table2 SET summary=@A WHERE type=1;
      COMMIT;
    ]]>
  </text>
</batch-sql>

Variable bindings

Need to figure out 2 types of variables:

  1. parameters passed in (use JDBC '?' markers?)
  2. temporary variables (@A)

=== Transaction Horizon

  • explicit (see above)
  • implicit - whole block is implicitly a start ... commit transaction
  • nesting - can batch-sql operations be batched together: what then happens to the transaction horizon?

Back to the top