camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements
Date Fri, 01 Jan 2016 21:31:40 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076377#comment-15076377
] 

ASF GitHub Bot commented on CAMEL-4725:
---------------------------------------

GitHub user snurmine opened a pull request:

    https://github.com/apache/camel/pull/749

    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
    
    ```javascript
    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 https://github.com/snurmine/camel CAMEL-4725

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

    https://github.com/apache/camel/pull/749.patch

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 <snurmine@gmail.com>
Date:   2015-12-20T21:34:33Z

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

----


> camel-sql - Add support for Callable statements
> -----------------------------------------------
>
>                 Key: CAMEL-4725
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4725
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-sql
>    Affects Versions: 2.8.3
>            Reporter: Christian Müller
>             Fix For: Future
>
>
> See [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message