...
You can append query options to the URI in the following format, ?option=value&option=value&...
Options
Div |
---|
class | confluenceTableSmall |
---|
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Name || Default Value || Description ||
| {{readSize}} | {{0}} | The default maximum number of rows that can be read by a polling query. The default value is 0. |
| {{statement.<xxx>}} | {{null}} | *Camel 2.1:* Sets additional options on the {{java.sql.Statement}} that is used behind the scenes to execute the queries. For instance, {{statement.maxRows=10}}. For detailed documentation, see the [{{java.sql.Statement}} javadoc|http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html] documentation. |
| {{useJDBC4ColumnNameAndLabelSemantics}} | {{true}} | *Camel 2.2:* Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it {{false}} in case you have issues with your JDBC driver to select data. This only applies when using {{SQL SELECT}} using aliases (e.g. {{SQL SELECT id as identifier, name as given_name from persons}}). |
| {{resetAutoCommit}} | {{true}} | *Camel 2.9:* Camel will set the autoCommit on the JDBC connection to be false, commit the change after executed the statement and reset the autoCommit flag of the connection at the end, if the resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag.|
| {{allowNamedParameters}} | {{true}} | *Camel 2.12:* Whether to allow using named parameters in the queries. |
| {{prepareStatementStrategy}} | | *Camel 2.12:* Allows to plugin to use a custom {{ Name | Default Value | Description |
---|
readSize | 0 | The default maximum number of rows that can be read by a polling query. The default value is 0. | statement.<xxx> | null | Camel 2.1: Sets additional options on the java.sql.Statement that is used behind the scenes to execute the queries. For instance, statement.maxRows=10 . For detailed documentation, see the java.sql.Statement javadoc documentation. | useJDBC4ColumnNameAndLabelSemantics | true | Camel 2.2: Sets whether to use JDBC 4/3 column label/name semantics. You can use this option to turn it false in case you have issues with your JDBC driver to select data. This only applies when using SQL SELECT using aliases (e.g. SQL SELECT id as identifier, name as given_name from persons ). | resetAutoCommit | true | Camel 2.9: Camel will set the autoCommit on the JDBC connection to be false, commit the change after executed the statement and reset the autoCommit flag of the connection at the end, if the resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag. | allowNamedParameters | true | Camel 2.12: Whether to allow using named parameters in the queries. | prepareStatementStrategy | | Camel 2.12: Allows to plugin to use a custom |
org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy
|
}} |
| {{useHeadersAsParameters}} | {{false}} | *Camel | useHeadersAsParameters | false | Camel 2.12: |
* {{}} {{}} |
| {{outputType}} | {{SelectList}} | *Camel | outputType | SelectList | Camel 2.12.1: |
*
* *
* * {{}} {{ }} [] |
| {{outputClass}} | {{null}} | *Camel | outputClass | null | Camel 2.12.1: |
* * * |
| {{beanRowMapper}} | | *Camel | beanRowMapper | | Camel 2.12.1: |
* {{org.apache.camel.component.jdbc.BeanRowMapper
|
}} {{}} {{}} {{}} |
{div} |
Result
By default the result is returned in the OUT body as an ArrayList<HashMap<String, Object>>
. The List
object contains the list of rows and the Map
objects contain each row with the String
key as the column name. You can use the option outputType
to control the result.
...