java.sql2 and primitive types
lukas.eder at gmail.com
Wed Oct 18 08:33:04 UTC 2017
I haven't seen any reference to primitive types in the suggested API, nor
in the JavaOne 2017 CON1491 presentation. Have there been considerations of
repeating API methods, e.g. in Result.ResultMap, such as:
- byte getByte(String id)
- short getShort(String id)
- int getInt(String id)
- long getLong(String id)
Likewise, ParameterizedOperation could have setByte(), setShort(), etc.
While I don't think this optimisation is significant in
ParameterizedOperation, it could be worth thinking about in ResultMap, e.g.
when someone fetches millions of longs vs millions of Longs.
Whether driver implementations profit from this additional API would be
entirely up to them.
More information about the jdbc-spec-discuss