Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

Transaction Tag? #17

@hansgru

Description

@hansgru

Is there a way to specify transactions in the processing and not just globally on the entire connection? Maybe with some tag or some script? Or when certain conditions are met in a script/query?

e.g. something like:

<connection id="in" driver="org.h2.Driver"/>
<connection id="out" driver="org.h2.Driver"/>

<query connection-id="in">
   select col11, col12, col13 from table1_in
   <script connection-id="out">
        insert into table1_out (col11_out, col12_out, col13_out) values (?col11,?col12,?col13)
   </script>
</query>

<query connection-id="in">
   select col21, col22, col23 from table2_in
   <script connection-id="out">
        insert into table2_out (col21_out, col22_out, col23_out) values (?col21,?col22,?col23)
   </script>
</query>

<!-- Commit after the first 2 tables are ready! -->
<commit/>

<query connection-id="in">
   select col31, col32, col33 from table3_in
   <script connection-id="out">
        insert into table3_out (col31_out, col32_out, col33_out) values (?col31,?col32,?col33)
   </script>
</query>

<query connection-id="in">
   select col41, col42, col43 from table4_in
   <script connection-id="out">
        insert into table4_out (col41_out, col42_out, col43_out) values (?col41,?col42,?col43)
   </script>
</query>

<!-- Another Commit ! -->
<commit/>

<query connection-id="in">
   select col51, col52, col53 from table5_in
   <script connection-id="out">
        insert into table5_out (col51_out, col52_out, col53_out) values (?col51,?col52,?col53)
   </script>
</query>

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions