Re: hsqldb stored procedures

From: Cris Daniluk (cris.danilu..mail.com)
Date: Thu Dec 08 2005 - 16:46:36 EST

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-406) HSQLDB stored procedure syntax not correct"

    Well, the problem ended up being stranger than I initially
    anticipated. One thing that I was not previously aware of us that
    HSQLDB does not support OUTs from stored procedures right now (even
    though their documentation implies they do). A quick look at
    jdbcCallableStatement shows no implementations for any of the
    output-related methods. It may be worthwhile to add a warning to alert
    users of this... not sure though.

    Second is that their parser is... subpar. Cayenne is sending:

    {? = call functionName(...)}

    HSQL only recognizes:

    {?= call functionName(...)} (note the lack of a space)

    Additionally, if the stored procedure has a period in the name, it
    needs to be surrounded in quotes. It did not look like all stored
    procedures could be put in quotes, so I only did for those containing
    periods to be safe.

    Also, to do the patch, I created a createTranslator method in
    ProcedureAction, similar to the one recently added to SelectAction.

    On 12/8/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Cris,
    >
    > I don't have anything meaningful to say, as I haven't investigated
    > HSQLDB stored procedures yet. One thing - if you make the
    > HSQLDBProcedureAction work, I'd appreciate contributing it to Cayenne
    > - we'll include it in 1.2
    >
    > Andrus
    >
    >
    > On Dec 8, 2005, at 2:22 AM, Cris Daniluk wrote:
    >
    > > Now I'm really going to start feeling like I'm talking to myself... it
    > > is actually the way the OUT parameter is handled, so it is very
    > > similar to SQLServer. The issue now is that it appears that hsql
    > > supports returning a ResultSet.
    > >
    > > On 12/7/05, Cris Daniluk <cris.danilu..mail.com> wrote:
    > >> p.s. I meant create a HSQLDBProcedureAction. I was stuck in 1.1 mode.
    > >>
    > >> On 12/7/05, Cris Daniluk <cris.danilu..mail.com> wrote:
    > >>> I'm having trouble getting stored procedures working in hsqldb. It's
    > >>> invoking { ? = call storedProcName(args) }. I think the brackets are
    > >>> supposed to be omitted in hsqldb.. and maybe some other
    > >>> differences as
    > >>> well.
    > >>>
    > >>> Before I go tinkering with a new datanode type for HSQLDB, I thought
    > >>> I'd solicit some feedback... looks like there are similar
    > >>> differences
    > >>> in SQLServer. Should I go ahead and create a new HSQLDBDataNode?
    > >>>
    > >>> Cris
    > >>>
    > >>
    > >
    >
    >





    This archive was generated by hypermail 2.0.0 : Thu Dec 08 2005 - 16:46:38 EST