java.sql2 and primitive types

Lance Andersen lance.andersen at
Wed Oct 18 11:19:53 UTC 2017

Hi Lukas,

> On Oct 18, 2017, at 4:33 AM, Lukas Eder <lukas.eder at> wrote:
> 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.

We have been trying  to move away from specific get/setXXX  as the API gets cluttered.  I guess it is something that could be revisited if there is a significant performance difference

> 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

 <> <>
 <>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at <mailto:Lance.Andersen at>

More information about the jdbc-spec-discuss mailing list