ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rs" <rustyst...@myway.com>
Subject Re: public int executeBatch()
Date Wed, 31 May 2006 14:53:23 GMT

> I think the JIRA patch is a good starting point towards working on a solution 
> to this.  rs - if you have further suggestions please add them to the JIRA 
> issue (for example, what do you mean by "return code"?  1/0? SQLCode?  
> SQLState?). 

My suggestion is that instead of returning int[], return FailedRecord[], that is, an array
(or List) of FailedRecords, where FailedRecord is something like:

public class FailedRecord {
  private int position; // failed record index in the batch
  private Exception reason; // (sql) exception describing the reason for failure
...
}

In case if there are no failures, return an empty array/List.

Regards,



_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way  your home on the Web - http://www.myway.com



Mime
View raw message