db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: How to return null param from a stored procedure?
Date Mon, 04 Oct 2004 00:28:58 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Boynes wrote:

> Daniel John Debrunner wrote:
>
>>
>> Derby always maps SMALLINT, INTEGER, REAL, DOUBLE, BIGINT SQL types to
>> Java primitives (short, int, float, double, long) for procedure and
>> functions. Thus passing SQL NULLS or returning them for OUT parameters
>> is not supported.
>>
>
> That's rather unfortunate. Is this due to some restriction in the SQL
> standard or is it just something missing from Derby?

I think just missing from Derby. The only issue with the SQL standard
would be following the defined rules for method resolution when multiple
methods are suitable. E.g. for your case if there were these two
methods, which is resolved to, or is it an exception?

public static void Int_Proc2(Integer[] param)
public static void Int_Proc2(int[] param)

It may that this is resolved by the application providing the method
signature in the create procedure, along with the external name,
something like (not sure of exact syntax according to the standard).

EXTERNAL NAME 'test.jdbc.CallableStatementTest.Int_Proc2(Integer)'

Derby (and Cloudscape) have never supported this method signature
definition.

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

iD8DBQFBYJlKIv0S4qsbfuQRAm2RAJwNT5VmFkTX+l1vB6T8YfjQrnML9ACfYCkj
B+DFJSCsgEHQXahq7P1hRDY=
=Fql+
-----END PGP SIGNATURE-----


Mime
View raw message