DockerERTFF/app/api/myRecordUpdateByID.json

74 lines
1.6 KiB
JSON

{
"meta": {
"$_POST": [
{
"type": "text",
"name": "obj_dataStore"
},
{
"type": "number",
"name": "id"
}
]
},
"exec": {
"steps": {
"name": "MyRecordUpdate",
"module": "dbupdater",
"action": "update",
"options": {
"connection": "MyDB",
"sql": {
"type": "update",
"values": [
{
"table": "da",
"column": "obj_dataStore",
"type": "text",
"value": "{{$_POST.obj_dataStore}}"
}
],
"table": "da",
"wheres": {
"condition": "AND",
"rules": [
{
"id": "id",
"type": "double",
"operator": "equal",
"value": "{{$_POST.id}}",
"data": {
"column": "id"
},
"operation": "="
}
]
},
"returning": "id",
"query": "update `da` set `obj_dataStore` = ? where `id` = ?",
"params": [
{
"name": ":P1",
"type": "expression",
"value": "{{$_POST.obj_dataStore}}",
"test": ""
},
{
"operator": "equal",
"type": "expression",
"name": ":P2",
"value": "{{$_POST.id}}",
"test": ""
}
]
}
},
"meta": [
{
"name": "affected",
"type": "number"
}
]
}
}
}