mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Less TODO
This commit is contained in:
1 parent
07176e941b
commit
4eac0797fa
1 file changed
+1
-3
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user