You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/01/26 04:20:27 UTC

[GitHub] [commons-dbutils] visruth edited a comment on issue #7: get generated keys from queryRunner.insertBatch

visruth edited a comment on issue #7: get generated keys from queryRunner.insertBatch
URL: https://github.com/apache/commons-dbutils/pull/7#issuecomment-578377584
 
 
   Hi @thecarlhall, `queryRunner.insertBatch` doesn't support `ColumnListHandler`. How can I get generated keys (primary key) of batch insert with `ColumnListHandler`?
   If you look in to the sample code I have given you can see that `ids` contain the generated keys of inserted rows in the same order of `params` rows inserted.
   
   For multiple rows insertion in to same table I'm using batch insert in my project which reduces a lot of time compared to individual insert operation.
   
   **NB: update**
   `queryRunner.insertBatch` does support `ColumnListHandler` that also achieves the same goal.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services