DeleteQueryBuilder
Builder for constructing DELETE queries with type-safe filtering.Type Parameters
DB- The database schema typeTB- Union of table names available (for the DELETE and joins)O- The output type (DeleteResult or custom with returning)
Methods
where
WhereInterface documentation for more examples.
Example:
whereRef
using
innerJoin
SelectQueryBuilder.innerJoin for examples.
leftJoin
innerJoin but adds a left join instead.
rightJoin
innerJoin but adds a right join instead.
fullJoin
innerJoin but adds a full join instead.
returning
returningAll
returning * or returning table.* clause to the query.
Examples:
Return all columns:
output
outputAll
output deleted.* clause (MS SQL Server).
top
delete from query to a delete top from query (MS SQL Server).
Example:
limit
SQLITE_ENABLE_UPDATE_DELETE_LIMIT).
Example:
orderBy
SQLITE_ENABLE_UPDATE_DELETE_LIMIT).
See OrderByInterface documentation for more examples.
modifyEnd
$call
this as the only argument.
Example:
$if
func(this) if condition is true.
Especially handy with optional returning or returningAll calls.
Example:
$castTo
$narrowType
execute
executeTakeFirst
undefined.