SERVER / DATABASE / WRITE

Delete

Delete removes records that match a declared equality filter and returns a result binding with the change count. The same operation dispatches to postgres, d1, or dowe through the selected database handle.

1 / REMOVE

Delete with an ownership filter

Use a static table and include every server-owned equality field required to authorize the deletion. required:true makes an empty match a controlled 404.

dowe
handler deleteBlog
  database db provider:"dowe" host:env.DOWE_HOST port:env.DOWE_PORT account:env.DOWE_USER secret:env.DOWE_PASSWORD name:"content"
  query deleted conn:db.delete table:"blogs" where:{ id:req.params.id ownerId:req.context.auth.subject } required:true
  return json:{ ok:true changed:deleted.changed }
Rule
Guidance

No data

There are no records to display