ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koka Kiknadze" <226...@gmail.com>
Subject Inserting lists
Date Fri, 18 Apr 2008 07:38:09 GMT
Yesterday I understood that I'm writing loops to insert a lists of objects
way too often.

I think implementing methods like:

insertList("insertSingleSomeObject",List<SomeObject>)    (with
"insertSingleSomeObject" beeing sqlmap entry for inserting single object)
batchInsert("insertSingleSomeObject",List<SomeObject>)  (with batch size
configurable like row prefetch is)

updateList("insertSingleSomeObject",List<SomeObject>)
batchUpdate("insertSingleSomeObject",List<SomeObject>)

would be quite straightforward.

Think it will make API more bidirectional, see, we have queryForList, i.e.
getting list of objects in a single call, so it's quite natural to expect
that one should be able to persist the list in a single call.

Wonder what others think about it.

Nicholoz Koka Kiknadze

Mime
View raw message