There is a special case for INTEGER, NUMERIC, and DECIMAL, mostly
doing something magical in the case we are using Oracle.  In the
non-Oracle case it loads the TableRow's column from getInt(), although
NUMERIC/DECIMAL data could exceed the range of long, let alone int.

Is there some reason that we should be returning int here?  Shouldn't
it be long instead?

(We really should be returning java.math.BigDecimal in the case of
NUMERIC/DECIMAL, but I won't go there just yet. :-)

The reason for this fuss is that I'm writing a simple little servlet
to return things like the total number of bytes stored in ORIGINAL
bundles across the whole repository, and sum(BIGINT) returns NUMERIC.
When the sum gets too big for int, I'm getting an SQLException (even
though the exception's message formatter has no trouble representing
the number!)  Getting back a long would let me represent repo.s holding
more than a paltry 2GB of content, which seems a reasonable wish.

Why *are* we doing the special little dance for Oracle, anyway?

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Friends don't let friends publish revisable-form documents.

Attachment: pgpAtonJFWJUH.pgp
Description: PGP signature

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to