commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBUTILS-17) [dbutils] ScalarHandler subclasses that return Integers and Longs
Date Fri, 03 Nov 2006 21:58:19 GMT
    [ http://issues.apache.org/jira/browse/DBUTILS-17?page=comments#action_12447087 ] 
            
Henri Yandell commented on DBUTILS-17:
--------------------------------------

I'm still iffy on it.

It converts Strings to numbers - which is more aggressive than other parts of dbutils. I'm
hesistant to include that part as it hides sloppiness (a VARCHAR column that should be a numerical
column at the schema level). 

Given that - I don't see any value to the classes. It lets you try to co-erce the return Number
type to a Long or Integer, but there's no need as Number is quite happily useable. 

Punting to a later version - most likely to a WONTFIX.

> [dbutils] ScalarHandler subclasses that return Integers and Longs
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-17
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-17
>             Project: Commons DbUtils
>          Issue Type: Improvement
>         Environment: Operating System: All
> Platform: All
>            Reporter: greg hawkes
>            Priority: Minor
>         Attachments: DBUTILS-17.patch, IntScalarHandler.java, LongScalarHandler.java
>
>
> I (and, looking around, many other people) most often use ScalarHandler to fetch
> the result of an SQL count(*) column. ScalarHandler works, but I was forever
> needing to parse the result to create an Integer (and occasionally, a Long)
> value. Several possible solutions have been proposed to make this task easier.
> This is mine.
> I have extended ScalarHandler to create IntScalarHandler and LongScalarHandler,
> which return Integers and Longs, respectively. Their usage is exactly the same
> as ScalarHandler. They have been tested on Oracle, MS-SQL Server, and PostgreSQL
> databases, and have proven to be very effective. I hope that they can be
> included in the DbUtils distribution, where they fit right alongside the
> existing ScalarHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message