From 279faa13e9ff73bc49ebbc8abfc4c54b4de9b66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 8 Sep 2017 13:23:20 +0200 Subject: [PATCH] Less TODO --- GRDB/Record/Persistable+Encodable.swift | 1 - GRDB/Record/TableMapping.swift | 2 +- GRDB/Utils/Utils.swift | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/GRDB/Record/Persistable+Encodable.swift b/GRDB/Record/Persistable+Encodable.swift index 3c5ad84ac..ffcbc5093 100644 --- a/GRDB/Record/Persistable+Encodable.swift +++ b/GRDB/Record/Persistable+Encodable.swift @@ -178,7 +178,6 @@ private struct PersistableEncoder : Encoder { } extension MutablePersistable where Self: Encodable { - /// TODO public func encode(to container: inout PersistenceContainer) { // The inout container parameter won't enter an escaping closure since // SE-0035: https://github.com/apple/swift-evolution/blob/master/proposals/0035-limit-inout-capture.md diff --git a/GRDB/Record/TableMapping.swift b/GRDB/Record/TableMapping.swift index 856e1d0ce..4fdba5dd2 100644 --- a/GRDB/Record/TableMapping.swift +++ b/GRDB/Record/TableMapping.swift @@ -95,7 +95,7 @@ extension TableMapping { // TODO: think about // - allowing non unique keys in Type.fetchOne(db, key: ...) ??? // - allowing non unique keys in Type.fetchAll/Cursor(db, keys: ...) - // - forbidding Player.deleteOne(db, key: ["email": nil]) since this may delete several rows (case of a nullable unique key) + // - forbidding nil values: Player.deleteOne(db, key: ["email": nil]) may delete several rows (case of a nullable unique key) static func filter(_ db: Database, keys: [[String: DatabaseValueConvertible?]], fatalErrorOnMissingUniqueIndex: Bool = true) throws -> QueryInterfaceRequest { // SELECT * FROM table WHERE ((a=? AND b=?) OR (c=? AND d=?) OR ...) let keyPredicates: [SQLExpression] = try keys.map { key in diff --git a/GRDB/Utils/Utils.swift b/GRDB/Utils/Utils.swift index c2c9ace94..92281cd9b 100644 --- a/GRDB/Utils/Utils.swift +++ b/GRDB/Utils/Utils.swift @@ -44,8 +44,6 @@ func GRDBPrecondition(_ condition: @autoclosure() -> Bool, _ message: @autoclosu /// Custom precondition function which aims at solving /// https://bugs.swift.org/browse/SR-905 and /// https://github.com/groue/GRDB.swift/issues/37 - /// - /// TODO: remove this function when https://bugs.swift.org/browse/SR-905 is solved. if !condition() { fatalError(message, file: file, line: line) }