back to query /// home
Modify existing rows in a table.
{
"action": "update",
"table": "items",
"data": {
"price": 29.99,
"status": "active"
},
"filter": {
"column": "id",
"op": "=",
"value": 42
}
}
| Field |
Type |
Required |
Notes |
action |
string |
yes |
must be "update" |
table |
string |
yes |
target table |
data |
object |
yes |
column value pairs to update |
where |
object |
yes* |
simple key value filter |
filter |
object |
yes* |
structured filter |
*at least one of where or filter is required. you cant do an unfiltered update.
{
"success": true,
"rows_affected": 1
}
- a WHERE clause is mandatory. the server refuses to run an update without one. this is a safety thingy yk
- columns you dont have write access to are silently stripped.
warning is included if json derulo stripped for you
last_modified_by auto set to your user ID
last_modified_at is handled by sqls ON UPDATE trigger
- ownership scoping applies: if you have
rwo you can only update rows where pinned_to equals your user ID uness you have rwa. same deal with rwg for group scoping
- limit is applied if set and capped to your max
- auto generation rules apply on update too if configured for the update action