You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/05/17 07:27:16 UTC
[jira] [Commented] (CAMEL-6157) Parametrized queries in JDBC
component
[ https://issues.apache.org/jira/browse/CAMEL-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13660346#comment-13660346 ]
Claus Ibsen commented on CAMEL-6157:
------------------------------------
Dev, thanks for the test.
I suggest to look at the SQL component as it now supports named parameters
http://camel.apache.org/sql-component
Maybe we should use same syntax in this component also. The code from camel-sql that parses the named parameters, can be ported to this component.
> Parametrized queries in JDBC component
> --------------------------------------
>
> Key: CAMEL-6157
> URL: https://issues.apache.org/jira/browse/CAMEL-6157
> Project: Camel
> Issue Type: Improvement
> Components: camel-jdbc
> Reporter: Henryk Konsek
> Fix For: Future
>
> Attachments: JdbcParameterizedQueryTest.java
>
>
> Juan pointed that currently it is difficult to create SQL-injection safe query with JDBC component. We could provide option to send query parameters via message header.
> {code}
> from("direct:sql").to("jdbc:testDB");
> ...
> producerTemplate.sendBodyAndHeader("direct:sql", "JDBC_PARAMETERS", "fooValue", "insert into foo values (?)");
> {code}
> [1] http://camel.465427.n5.nabble.com/Dinamyc-SQL-with-arguments-tp5729003.html
--
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