camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snurmine <>
Subject [GitHub] camel pull request: CAMEL-4725 camel-sql - Add support for Callabl...
Date Fri, 01 Jan 2016 21:31:37 GMT
GitHub user snurmine opened a pull request:

    CAMEL-4725 camel-sql - Add support for Callable statements

    Here is demo of how calling stored procedure could work. I call them Simple Stored Procedure
Templates. Current solution is just a proof-of-concept and has style, bugs, missing features
etc. issues. I provide this PR just for discussion.
    Idea is that instead of SQL-query, a simple template is used to describe stored procedure.
From parsed template, subclass of org.springframework.jdbc.object.StoredProcedure can then
be constructed by information given in the template. For example
    sql:sspt:ADDNUMBERS(INTEGER VALUE1 ${headers.num1},INTEGER VALUE2 ${headers"
                            + ".num2},OUT INTEGER RESULT resultofsum)
    Here Producer would call ADDNUMBERS stored procedure using parameters VALUE1 and VALUE2.
    Values are fetched from headers "num1" and "num2". Output (INTEGER) is stored into header
"resultofsum". Here INTEGER refers to java.sql.Types field INTEGER. Parameter order seems
to be meaningfull, but names a still given.
    Test org.apache.camel.component.sql.sspt.ProducerTest shows how template is used in Procuder.
    I can polish solution further if this approach seems okey.

You can merge this pull request into a Git repository by running:

    $ git pull CAMEL-4725

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #749
commit 281a10a22436a679f2f51c57a2175cdf6535f65f
Author: Sami Nurminen <>
Date:   2015-12-20T21:34:33Z

    CAMEL-4725 camel-sql - Add support for Callable statements


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message