How to use [data.delete]
The reference page of data.delete has its arguments, constraints and declaration.
This slot deletes rows in your database, using the current open connection created by [data.connect]. It takes the same arguments as [sql.delete], and its value resolves to the number of rows affected. The [where] argument is mandatory, to make it impossible to delete every row in a table by accident.
- [table] - Name of the table to delete from. Mandatory, the slot throws if it is missing
- [where] - Condition constraining which rows to delete, see the [where] documentation below
- [database-type] - Database adapter to use instead of your default database type
- [generate] - If true, only generates the SQL and its parameters instead of executing it, default is false
Below is an example.
data.connect:sakila
data.delete
table:actor
where
and
first_name:John
last_name:Doe