db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6729) ResultSet should accept a BigInteger request for a BIGINT column
Date Sun, 07 Sep 2014 16:45:28 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-6729:
       Urgency: Normal
    Issue Type: Improvement  (was: Bug)

Quote from [the JDBC spec|http://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getObject-int-java.lang.Class-]'s
description of the ResultSet.getObject(int, Class) method:

"At a minimum, an implementation must support the conversions defined in Appendix B, Table
B-3 and conversion of appropriate user defined SQL types to a Java type which implements SQLData,
or Struct. Additional conversions may be supported and are vendor defined."

Table B-3 does not map any type to BigInteger (NUMERIC and DECIMAL are mapped to BigDecimal,
BIGINT is mapped to Long), so I'm changing the issue type from bug to improvement.

The spec does allow other conversions defined by the vendors, and BigInteger sounds like a
reasonable one to add.

The change would affect the following methods:

ResultSet.getObject(int, Class)
ResultSet.getObject(String, Class)
CallableStatement.getObject(int, Class)

> ResultSet should accept a BigInteger request for a BIGINT column
> ----------------------------------------------------------------
>                 Key: DERBY-6729
>                 URL: https://issues.apache.org/jira/browse/DERBY-6729
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions:,
>            Reporter: Michael McCarthy
>            Priority: Minor
> I raised an issue on the Spring Framework JIRA at https://jira.spring.io/browse/SPR-12157
for something I thought was Spring related but looks like it may be down to behaviour in Derby.
> Not sure if it is a bug as such but in Spring 4.1 they are retrieving items from the
resultset in a slightly different way, using getObject(index, requiredType) rather than simply
getObject(index). This approach works with H2 and HSQLDB but not with Derby. 
> There is a pull request with a failing test that describes this on the thread for that
ticket. Thanks

This message was sent by Atlassian JIRA

View raw message