StatementExecutorValve
Valve for executing JDBC/SQL statements.
If no Items exist in the Current Item Set (CIS), the valve will execute the configured statement and populate the CIS with the result set (if any). If Items exist in CIS the Valve operates on them and will execute the statement on all Items surviving the common item filtering rules.
When transforming the statement result to Items, the first column in the result set is used as id. Make sure your statement returns the columns in the correct order.
Note: This valve does not use prepared statements parameters – make sure that statement input is valid before executing to avoid sql-injection exploits.
Properties
Example Configuration
{
"name": "StatementExecutorValve",
"config": {
"connection_ref":"cff2ddff-9585-47c5-9286-2bee2b731197",
"statement":"SELECT uid,email FROM Users where uid = 'user_1'"
}
}