aboutsummaryrefslogtreecommitdiff

Delete

back to query /// home

Remove rows from a table.

Request

{
  "action": "delete",
  "table": "items",
  "filter": {
    "column": "id",
    "op": "=",
    "value": 42
  }
}

Fields

Field Type Required Notes
action string yes must be "delete"
table string yes target table
where object yes* simple key value filter
filter object yes* structured filter

*at least one of where or filter is required. no unfiltered deletes lol.

Response

{
  "success": true,
  "rows_affected": 1
}

Behaviors

  • WHERE clause is mandatory. same as update, no blanket deletes allowed. jsonderulo doesnt want you nuking entire tables on accident
  • ownership scoping should be applied based on your permission level
  • limit should be applied and capped to your max
  • you need write permission on the table (rw, rwa, rwo, rwg)