db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [jira] Updated: (DERBY-89) Support Java Signature in procedure declaration
Date Wed, 08 Dec 2004 15:56:45 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Boynes wrote:

> Daniel John Debrunner wrote:
>
>> Jeremy Boynes (JIRA) wrote:
>>
>>>>
>>>> Patch that supports Java signature in the external name provided they
>>
>>
>> Jeremy, any idea what happens with your patch if the incorrect type is
>> specified for a parameter, e.g. java.lang.String for a SQL INTEGER?
>> Assuming there is such a method.
>>
>
> If the value passed to CallableStatement.setString() can be converted to
> a numeric value then it is passed through; if it is not then you get:
>
> ERROR 22018: Invalid character string format for type INTEGER.
>
> This appears consistent with trying to insert a string value into an
> integer column.

I don't think that's what I meant. I should have been clearer.

If you create a procedure with a method signature that contains an
incorrect Java type for the SQL procedure parameter, what happens?

Example, see the Map type in the java signature here.

create procedure ambigious03(p1 INTEGER, p2 INTEGER)
    language java parameter style java
    external name
'org.apache.derbyTesting.functionTests.util.ProcedureTest.ambigious2(int,java.util.Map)


I think from a quick reading of the SQL standard part 13 that such a
method signature should not lead to a successful method resolution,
since INTEGER is not type mappable to java.util.Map, even if such a
method exists.

Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBtyQ9Iv0S4qsbfuQRArRPAJ9tuSDz/zToVGZ61Kk0anDr84t0BwCbB+4M
OTjc7Flw4OCPgwT7JT4I4jg=
=lzqB
-----END PGP SIGNATURE-----


Mime
View raw message