MySQL Executer Documentation
Version: 1.2.3
Retrieved: 2025-10-09 15:16:07
MySql Server Executer
This modules executes a raw sql statement.
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Target Property | Not null | The property that contains the result | |
| SQL Statement | Not null | The SQL statement to execute | |
| Request Type | Query |
Credential
This module needs a credential of type 'Connection string' to connect to the database server. A minimal connection string is shown below. Depending on the setup of your database server additional parameters may be needed. Please consult the documentation for your server.
Server=tcp:192.168.0.5;Database=crosser;User ID=demo;Password=crosser123;
Input
Any input message can be used to trigger execution of the SQL statement. Properties in the message can be referenced in the SQL statement using @ syntax. If message properties are used in the SQL statement they must be present on the incoming message.
Output
An output message will be sent each time the module receives a message.
| Name | Type | Description |
|---|---|---|
| crosser.success | Boolean | True if the message was stored properly in the database, otherwise False |
| crosser.message | String | Contains a error message in case the insert failed, if the insert is successful this property is not set. |
| [Target Property] | Object array | Will contains the number of rows affected in case of a command, and the result in case of a query |
Examples
Example 1
Select and return all rows containg a temp larger then data.temp
# Settings
Target Property: out
SQL Statement: SELECT * FROM temps WHERE temp > @data.temp;
Request Type: query
# Input
{
"data": {
"temp": 50
}
}
# Output
{
"data": {
"temp": 50
},
"out": [
{
"name": "sensor3",
"temp": 129
},
{
"name": "sensor4",
"temp": 489
}
],
"crosser": {
"success": true
}
}
Example 2
Delete all readings in temps
# Settings
Target Property: out
SQL Statement: DELETE FROM temps;
Request Type: command
# Input
{
"data": {
"temp": 50
}
}
# Output
{
"data": {
"temp": 50
},
"out": {
"rowCount": 0
},
"crosser": {
"success": true
}
}
Search Documentation
Databases