java.sql2 and primitive types

Lukas Eder lukas.eder at gmail.com
Wed Oct 18 08:33:04 UTC 2017


Hello,

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)
- etc.

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.

Thanks,
Lukas


More information about the jdbc-spec-discuss mailing list