1 Reply Latest reply on Sep 23, 2011 4:26 AM by Claus Ibsen

    Questions on camel sql

    Jochen Lauer Apprentice

      Hello together,


      i have some questions on camel sql component.

      I have a route which is invoked by a REST service.


      My params are in ${body[0]}, ${body[1]} and ${body[2]} and I want to pass this parameters to a sql step





      Is there a way to log the sql statement which is produced by the step above ?


      Do I haven to provide the params in the right order in my REST service or is it posible

      to change the order e.g use a placeholder like #1





      Edited by: labo32 on Sep 23, 2011 5:18 AM

        • 1. Re: Questions on camel sql
          Claus Ibsen Master

          The parameters in the SQL should be in correct order, and does not support using named placeholders. So you have to use the # for each placeholder.


          The body will be iterated, so it can contain a List which has the parameters.


          The camel-sql component uses Spring JDBC under the hood, so that framework may log the SQL statement.


          We may be able to improve camel-sql so it also logs the statement. But its using a PreparedStatement so the placeholders is bound.