AW: java.sql.ResultSet.getObject() Kawa(?) bug, (as <int> 1)
Per Bothner
per@bothner.com
Fri Dec 20 10:36:00 GMT 2002
Hoehle, Joerg-Cyril wrote:
> BTW, Kawa-1.6.98 doc says:
> as type value: ... Not supported for type to be a primitive type such as <int>.
> Is that still correct?
It probably works when the as can be inlined by a compiler, but probably
does weird things when called as a non-inlined function.
(Long-term, I think it wou;d make sense that when an <int> is converted
to an Object we would get a <java.lang.Integer>, but <gnu.math.IntNum>
os used for unbounded integers. But that requires enhancing all of
Kawa's arithmetic - *after* we carefully define the semantics!)
> I find the following differences strange:
> #|kawa:9|# (invoke (as <int> 1) 'get-class)
> class java.lang.Integer
Yes, that is strange. I don't know what causes that.
You might try to make sure the invoke gets compiled. For example:
(let ((one :: <int> 1)) (invoke rs 'getObject one))
Otherwise, I need a real testcase with simple instructions. Note
that I don't have any JDBC experience, and I'd need to know how to
set up a simple database (under Linux). (It would be great if someone
wrote up a little how-to document on using Kawa with JDBC.)
It doesn't help that I dispise JDBC. Sending interpreted SQL
statements is just too kludgy. low-level, and non-object-oriented.
I'm wondering if JDO might be a better match for Kawa, especially
since Kawa already has all the machinery for creating classes on the
fly.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Kawa
mailing list