aboutsummaryrefslogtreecommitdiff
path: root/query/delete.md
blob: db552922c38e97de69ee0c1a14de2d6ea83f3ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

   

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)