mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Merge branch 'master' of github.com:groue/GRDB.swift into Swift3
Conflicts: DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj/project.pbxproj GRDB/Core/Database.swift README.md TODO.md
This commit is contained in:
commit
a8b067885f
38 files changed
+1208
-71
No files matched your search
@@ -213,6 +213,22 @@ extension QueryInterfaceRequest {
|
||||
}
|
||||
|
||||
|
||||
extension QueryInterfaceRequest {
|
||||
|
||||
// MARK: Deleting
|
||||
|
||||
/// Deletes matching rows; returns the number of deleted rows.
|
||||
///
|
||||
/// - parameter db: A database connection.
|
||||
/// - returns: The number of deleted rows
|
||||
/// - throws: A DatabaseError is thrown whenever an SQLite error occurs.
|
||||
@discardableResult public func deleteAll(_ db: Database) throws -> Int {
|
||||
try query.makeDeleteStatement(db).execute()
|
||||
return db.changesCount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension QueryInterfaceRequest {
|
||||
|
||||
// MARK: QueryInterfaceRequest as subquery
|
||||
|
||||
Reference in new issue
Block a user