mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Less TODO
This commit is contained in:
1 parent
0309abca6f
commit
279faa13e9
3 files changed
+1
-4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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<Self> {
|
||||
// SELECT * FROM table WHERE ((a=? AND b=?) OR (c=? AND d=?) OR ...)
|
||||
let keyPredicates: [SQLExpression] = try keys.map { key in
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user