db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: [jira] Commented: (DERBY-695) Re-enable the TINYINT datatype
Date Thu, 10 Nov 2005 14:17:03 GMT


Satheesh Bandaram wrote:

> What does this mean? Section 8.3.4 at 
> http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/mapping.html.

  The JDBC TINYINT is intended to represent the datatype on the backend 
which in the databases i am familiar with is a range  0-255 such as 
Sybase and MS SQL Server where I believe this type originated.  This 
section of the tutorial is a guideline for an attempted best match for 
the types it would map to on the backend

Regards,
Lance

> "The recommended Java mapping for the *JDBC |TINYINT|* type is as 
> either a *Java |byte|* or a *Java |short|*. The 8-bit Java |byte| type 
> represents a signed value from |-128| to |127|, so *it may not always 
> be appropriate* for larger |TINYINT| values, whereas the *16-bit Java 
> |short| will always be able* to hold all |TINYINT| values."
>
> This seems to infer JDBC TINYINT range of 0-255.
>
> Satheesh
>
> Lance J. Andersen wrote:
>
>> Nope the only section which discusses this is Appendix B which 
>> indicates the equivalent Java type is a byte.
>>
>> -lance
>>
>>>But I'm tired and jet-lagged ...
>>>
>>>Dan.
>>>
>>>
>>>
>>>
>>>  
>>>

Mime
View raw message