pfx-sql:delete
Deletes data from a database table with a filter.
Properties
Option | Type | Default | Description |
---|---|---|---|
| string |
| Defines a Data Source name. |
| string | Â | Defines a DB table. |
| string | Â | Defines a filter for the delete command. |
Examples
Deletes from a table defined in the URI parameter of the pfx-sql component using a predefined filter.
Filter:
<filter id="deleteFilter">
<and>
<criterion fieldName="price" operator="greaterThan" value="100"/>
<or>
<criterion fieldName="sku" operator="greaterThan" value="'1'"/>
<criterion fieldName="testCol" operator="notNull"/>
</or>
<not>
<criterion fieldName="timeCol" operator="lessThan" value="'2021-01-14 00:00:00.0'"/>
</not>
</and>
</filter>
Route:
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:sql-delete"/>
<to uri="pfx-sql:delete?dataSource=dataSource&table=cars&filter=deleteFilter"/>
</route>
</routes>
Â
IntegrationManager version 5.8.0