Quantcast

getting results for multiple delete statements (mybatis-guice)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

getting results for multiple delete statements (mybatis-guice)

Stephen Friedrich-2
Using MySQL and connection parameter allowMultiQueries=true, I can issue these statements using a single DB roundtrip:
    <delete id="deleteTask">
        delete from task_status_history where task_id = #{id};
        delete from tree_views where ref_id = #{id};
        delete from tasks where id = #{id} and version_no = 0;
    </delete>
Now how the heck can I access the three individual delete counts?

I am using mybatis-guice.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: getting results for multiple delete statements (mybatis-guice)

Larry Meadors
Use a stored procedure.

On Thu, Apr 19, 2012 at 8:36 AM, Stephen Friedrich
<[hidden email]> wrote:

> Using MySQL and connection parameter allowMultiQueries=true, I can issue
> these statements using a single DB roundtrip:
>     <delete id="deleteTask">
>         delete from task_status_history where task_id = #{id};
>         delete from tree_views where ref_id = #{id};
>         delete from tasks where id = #{id} and version_no = 0;
>     </delete>
> Now how the heck can I access the three individual delete counts?
>
> I am using mybatis-guice.
Loading...