# DeleteStatement

open class DeleteStatement(val targetsSet: ColumnSet, val where: Op<Boolean>? = null, val isIgnore: Boolean = false, val limit: Int? = null, val targetTables: List<Table> = emptyList()) : Statement<Int>

Represents the SQL statement that deletes one or more rows of a table.

#### Parameters

targetsSet

Column set to delete rows from. This may be a Table or a Join instance.

where

Condition that determines which rows to delete.

isIgnore

Whether to ignore errors or not. Note isIgnore is not supported by all vendors. Please check the documentation.

limit

Maximum number of rows to delete.

targetTables

List of specific tables from targetsSet to delete rows from.

## Constructors

DeleteStatement
Link copied to clipboard
constructor(targetsSet: ColumnSet, where: Op<Boolean>? = null, isIgnore: Boolean = false, limit: Int? = null, targetTables: List<Table> = emptyList())

## Properties

isIgnore
Link copied to clipboard
val isIgnore: Boolean
limit
Link copied to clipboard
val limit: Int?
targets
Link copied to clipboard
val targets: List<Table>
targetsSet
Link copied to clipboard
val targetsSet: ColumnSet
targetTables
Link copied to clipboard
val targetTables: List<Table>
type
Link copied to clipboard
val type: StatementType
where
Link copied to clipboard
val where: Op<Boolean>?

## Functions

arguments
Link copied to clipboard
open override fun arguments(): Iterable<Iterable<Pair<IColumnType<*>, Any?>>>

Returns all mappings of columns and expression types to their values needed to prepare an SQL statement.

prepareSQL
Link copied to clipboard
open override fun prepareSQL(transaction: Transaction, prepared: Boolean = true): String

Returns the string representation of an SQL statement.