HikariCP
HikariCP copied to clipboard
Return `null` when applicable from `getGeneratedKeys`
Currently, there is no way to check if getGeneratedKeys
returned null
. Instead, when trying to call ResultSet.next()
a NullPointerException
is thrown.
This method should return an empty ResultSet
when there are no generated keys, but not all JDBC drivers do (like Apache Derby) In these cases, I think the safest option is to return null
, which can then be checked (and is checked in popular JDBC libraries like JOOQ.)