brianm/jdbi — pull request #101 by arteam (2014-04-27 15:51:35+00:00)
Title: Ability to get generated keys from execution of a prepared batch request

Judging on the [discussion](https://groups.google.com/forum/#!topic/jdbi/ZDqnfhK758g) from the user-group it seems as an useful functionality.

As I am aware H2 doesn't support key generation in a batch (relevant [issue](http://code.google.com/p/h2database/issues/detail?id=357)), but HSQLDB [do](http://sourceforge.net/p/hsqldb/bugs/1159/).
So I had to add the HSQLDB dependency to test this functionality. Anyway, it seems a better solution then trying to start a MySQL database in unit-tests, as Brian pointed in the discussion.

I don't really like the way I've implemented this feature. Specifically, returning **Object** from **internalBatchExecute** method and then suppressing a warning from a compiler, but couldn't figure out how to generalize **execute** method and don't create an another abstraction level. The code seems to be too coupled.

I've chose the in-memory database mode in tests, because we don't need keep states between tests and maintaining a database in the memory is a lot simpler than in the disk. As we don't need many HSQLDB tests here, I think it's justified.