-
The table to delete rows from.
Declaration
Swift
public let table: Table -
The SQL WHERE clause containing the filter for rows to delete. Could be represented with a
Filterclause or aStringcontaining raw SQL.Declaration
Swift
public private(set) var whereClause: QueryFilterProtocol? { get } -
A String with a clause to be appended to the end of the query.
Declaration
Swift
public private(set) var suffix: QuerySuffixProtocol? { get } -
An array of
AuxiliaryTablewhich will be used in a query with a WITH clause.Declaration
Swift
public private(set) var with: [AuxiliaryTable]? { get } -
Initialize an instance of Delete.
Declaration
Swift
public init(from table: Table, where conditions: QueryFilterProtocol? = nil)Parameters
fromThe table to delete rows from.
conditionsAn optional where clause to apply.
-
Build the query using
QueryBuilder.Throws
QueryError.syntaxError if query build fails.Declaration
Swift
public func build(queryBuilder: QueryBuilder) throws -> StringParameters
queryBuilderThe QueryBuilder to use.
Return Value
A String representation of the query.
-
Add an SQL WHERE clause to the delete statement.
Declaration
Swift
public func `where`(_ conditions: QueryFilterProtocol) -> DeleteParameters
conditionsThe
Filterclause or aStringcontaining SQL WHERE clause to apply.Return Value
A new instance of Delete.
-
Add a raw suffix to the delete statement.
Declaration
Swift
public func suffix(_ raw: String) -> DeleteParameters
rawA String with a clause to be appended to the end of the query.
Return Value
A new instance of Delete.
View on GitHub
Delete Structure Reference