mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Query Interface deletion documentation
This commit is contained in:
1 parent
e4ae0988a4
commit
b191323e2b
4 files changed
+88
-11
No files matched your search
@@ -237,11 +237,14 @@ extension QueryInterfaceRequest {
|
||||
|
||||
// MARK: Deleting
|
||||
|
||||
/// Returns the number of rows matched by the request.
|
||||
/// Deletes matching rows; returns the number of deleted rows.
|
||||
///
|
||||
/// - parameter db: A database connection.
|
||||
public func deleteAll(db: Database) throws {
|
||||
/// - returns: The number of deleted rows
|
||||
/// - throws: A DatabaseError is thrown whenever an SQLite error occurs.
|
||||
public func deleteAll(db: Database) throws -> Int {
|
||||
try query.makeDeleteStatement(db).execute()
|
||||
return db.changesCount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user