Documentation

This commit is contained in:
Gwendal Roué committed 2016-11-29 14:17:41 +01:00
1 parent a8e266377c
commit 527aed0ea3
13 files changed
+311 -101

No files matched your search

@@ -304,7 +304,8 @@ extension QueryInterfaceRequest {
/// - 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 {
@discardableResult
public func deleteAll(_ db: Database) throws -> Int {
try query.makeDeleteStatement(db).execute()
return db.changesCount
}
@@ -475,7 +476,8 @@ extension TableMapping {
/// - parameter db: A database connection.
/// - returns: The number of deleted rows
/// - throws: A DatabaseError is thrown whenever an SQLite error occurs.
@discardableResult public static func deleteAll(_ db: Database) throws -> Int {
@discardableResult
public static func deleteAll(_ db: Database) throws -> Int {
return try all().deleteAll(db)
}
}