Here's the code snippet.

Query query = dslContext.insertInto("TABLENAME")
                        .set("COLUMN1",(Long) null)
                        .set("COLUMN2",(Long) null)
                        .set("COLUMN3",(Integer) null)
                        .set("COLUMN4",(String) null)
                        .set("COLUMN5",(Integer) null)
                        .set("COLUMN6",(Long) null);
BatchBindStep batch = dslContext.batch(query);
for (Object obj : arrOfObjects) {
  batch = batch.bind(obj.getVariable1(), obj.getVariable2(),
      obj.getVariable3(), obj.getVariable4(), 
obj.getVariable5(),obj.getVariable6());

}

// although all the data looks to be inserted correctly, -2 is returned in each 
position of the 'result' array
int[] result = batch.execute();

E code here...



On Thursday, 5 March 2020 21:22:40 UTC-5, Joe Bassil wrote:
>
> Hi,
>
> I have implemented a batch insert operation using the BatchBindStep 
> construct and I am confused by the int array values returned from the 
> BatchBindStep.execute(). I expected to get the record count for each 
> executed batch but instead I am getting a negative number (-2) for each 
> batch execute call instead.  Can someone explain this as I cannot find 
> anything in the documentation to explain this.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/9b75bb1a-9dc4-4458-936c-0a6c732a6574%40googlegroups.com.

Reply via email to