db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-2927) Procedures can't return values other than ResultSets
Date Sun, 14 Oct 2012 02:50:03 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Dag H. Wanvik updated DERBY-2927:

    Attachment: derby-2927-diag.stat

Uploading a patch which improves diagnostics for two cases:

a) a bindable routine which is a procedure is being attempted used as a function
b) a bindable function which is a procedure is attemped CALLed

Added a new test case, LangProcedureTest#testDerby2927.

LangProcedureTest is not currently being run as part of the lang suite, due to the porting
effort not being complete (DERBY-2461).

This patch also fixes up the rest of LangProcedureTest so it runs correctly. Note, only for
embedded, cf. the issues Kathey observed with the client. I suggest we file a new issue for
adding a client run of this test.

Note: since the initial conversion  of th test, Derby semantics has changed in a few places,
so my changes reflect those.

Running regressions.
> Procedures can't return values other than ResultSets
> ----------------------------------------------------
>                 Key: DERBY-2927
>                 URL: https://issues.apache.org/jira/browse/DERBY-2927
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>         Environment: Java 1.4.2
> Windows XP SP 2
>            Reporter: Jacques Coetzee
>              Labels: derby_triage10_10
>         Attachments: derby-2927-diag.diff, derby-2927-diag.stat
> First off, this is not really a bug, it's more of a restriction.
> As per the needs of my inhouse framework I need a procedure to be able to return a value
other than
> a ResultSet (I need a integer). The reason I need to use a procedure; is because I'm
using INOUT parameters.
> When call my procedure, it needs to look like this:
> { ? = call myProcedure(?,?,?,?,?,?)}
> Where the first ? represents a status-code, ie a failure = -1, and a successfull would
be 1.
> All the other procedure paramters are INOUT.
> If I where to use normal scripting methods in any other DB, for instance DB2 or Oracle
> then I would be able to do this. It seems that the problem has to do with using
> JAVA "Stored" Procedures.
> Is it possible to either make procedures return primitive types, OR
> for Functions to be able to use OUT and INOUT paramters?
> I've got High Hopes for Derby, but it's issues like this that might just
> sway me to use a different DB.
> I appreciate any feedback you can give me.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message