diesel::delete. Portable Diesel on the DuckDB backend.
Deleting matching rows
Pass a filtered table todiesel::delete:
.execute returns the number of rows deleted.
DuckDB-only predicates work in the filter once the DSL prelude is imported — see
Operators:
Deleting all rows
A delete with no filter removes every row:Returning deleted values
Chain.returning(...) with get_result/get_results to read columns from the rows that were deleted:
See also
Update
Modify rows instead of removing them.
RETURNING
Read values back from a delete.
Transactions
Make a multi-step delete atomic.
Select
Preview what a filter matches before deleting.