camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zemian Deng (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-6366) SQL component - Add option to dictate if output is list, object or map
Date Fri, 02 Aug 2013 20:03:48 GMT

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

Zemian Deng edited comment on CAMEL-6366 at 8/2/13 8:02 PM:
------------------------------------------------------------

Hi Claus,

Thanks for the feedback. I added the feature with the assumption that you want something already
provided by Spring's JdbcTemplate RowMapper provided. Because underneath camel-sql we are
already using JdbcTemplate to query data. Currently the outputType=Object will actually map
to an object/bean and auto populate setters from each column using a BeanPropertyRowMapper.
I thought it's quiet useful to have this option for user to auto converted a query result
to list of user objects.

Anyhow, let me read up little more on mybatis impl and then see if I can fully understand
what exactly is that you are asking for here. As of now, I am a bit confused. :)
                
      was (Author: saltnlight5):
    Hi Claus,

Thanks for the feedback. I added the feature with the assumption that you want something already
provided by Spring's JdbcTemplate RowMapper provided. Because underneath camel-sql we are
already using JdbcTemplate to query data. Currently the outputType=Object will actually map
to an object/bean and auto populate setters from each column using a BeanPropertyRowMapper.

Anyhow, let me read up little more on mybatis impl and then see if I can fully understand
what exactly is that you are asking for here. As of now, I am a bit confused. :)
                  
> SQL component - Add option to dictate if output is list, object or map
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-6366
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6366
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sql
>            Reporter: Claus Ibsen
>             Fix For: 2.12.0
>
>         Attachments: CAMEL-6366.patch
>
>
> When using the sql component, the output is always a List<Map>.
> It would be nice if you could configure an option to say its a 
> - selectForObject
> - selectForList
> - selectForMap
> Like MyBatis can do.
> Also we can consider having a way to store the output on a header instead of altering
the body. 

--
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

Mime
View raw message