How to do batch update in for loop?

990 views
Skip to first unread message

Venkat Sadasivam

unread,
Jul 2, 2013, 2:54:43 PM7/2/13
to jooq...@googlegroups.com
I see example of batch update here.

How I can do the same in for loop?

Lukas Eder

unread,
Jul 2, 2013, 3:06:20 PM7/2/13
to jooq...@googlegroups.com
I'm not quite sure what you mean. As in the following example?

    BatchBindStep b = ctx.batch(...);
    for (int i = ...) {
        b.bind(...);
    }
    b.execute();

Even if most of jOOQ's API is a DSL, it can still be used as any regular Java API. Every method has a return type, which can be stored in a local variable for subsequent calls. This also holds true for dynamic SQL, of course.

Cheers
Lukas


2013/7/2 Venkat Sadasivam <venka...@gmail.com>
I see example of batch update here.

How I can do the same in for loop?

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Venkat Sadasivam

unread,
Jul 2, 2013, 4:23:11 PM7/2/13
to jooq...@googlegroups.com
Thanks.
Reply all
Reply to author
Forward
0 new messages