From 4eac0797fa8f47b8b520b0fb9d93b1247166be82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 21 May 2018 07:39:30 +0200 Subject: [PATCH] Less TODO --- GRDB/QueryInterface/Association/ForeignKeyRequest.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GRDB/QueryInterface/Association/ForeignKeyRequest.swift b/GRDB/QueryInterface/Association/ForeignKeyRequest.swift index 014c07b8c..771e90a77 100644 --- a/GRDB/QueryInterface/Association/ForeignKeyRequest.swift +++ b/GRDB/QueryInterface/Association/ForeignKeyRequest.swift @@ -41,8 +41,8 @@ struct ForeignKeyRequest { return false } } - // TODO: test if let destinationColumns = destinationColumns { + // TODO: test let destinationColumns = Set(destinationColumns.lazy.map { $0.lowercased() }) let foreignKeyColumns = Set(foreignKey.mapping.lazy.map { $0.destination.lowercased() }) if destinationColumns != foreignKeyColumns { @@ -56,7 +56,6 @@ struct ForeignKeyRequest { if let foreignKey = foreignKeys.first { if foreignKeys.count == 1 { // Non-ambiguous - // TODO: test return foreignKey } else { // Ambiguous: can't choose @@ -68,7 +67,6 @@ struct ForeignKeyRequest { if let originColumns = originColumns { let destinationColumns = try db.primaryKey(destinationTable).columns if (originColumns.count == destinationColumns.count) { - // TODO: test let mapping = zip(originColumns, destinationColumns).map { (origin: $0, destination: $1) }