On 10/31/12 7:49 AM, Matthew Abbott wrote:
I'm writing a User Defined Function in java for use in my derby db,
and I am looking for syntax on how to make some of the arguments
optional.  In my java I have overloaded methods depending on what you
pass to it, but have not found  an example on creating optional
arguments in a CREATE FUNCTION sql call that points to my java class.

Can anyone shed some light on this for me?  I don't know where to
search if this question has already been asked on this mailing list,
so my apologies if this has been asked before.

Thank you!

-Matthew

Hi Matthew,

You might be interested in the proposal at the end of the discussion on https://issues.apache.org/jira/browse/DERBY-3069. What's being proposed there is a way to bind a function/procedure to a static Java method with trailing varargs. Note that what is being proposed is a Derby extension which would not be portable to other databases. However, if the extension turns out to be useful for a lot of people, that will give us an argument for taking this proposal to the SQL committee for inclusion in a future rev of the SQL Standard. I hope to attach a detailed functional spec to DERBY-3069 soon. Would the proposal on DERBY-3069 satisfy your requirement? Would trailing varargs satisfy your need for optional arguments?

Thanks,
-Rick

Reply via email to