mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
FetchedRecordsController cleanup
This commit is contained in:
1 parent
90f0ebde1d
commit
235fa57423
1 file changed
-17
@@ -557,23 +557,6 @@ private final class FetchedRecordsObserver<Record: RowConvertible> : Transaction
|
||||
}
|
||||
}
|
||||
|
||||
private func databaseEventFilter(readInfo: SelectStatement.ReadInfo) -> (DatabaseEventKind) -> Bool {
|
||||
return { kind in
|
||||
switch kind {
|
||||
case .delete(let tableName):
|
||||
return readInfo[tableName] != nil
|
||||
case .insert(let tableName):
|
||||
return readInfo[tableName] != nil
|
||||
case .update(let tableName, let updatedColumnNames):
|
||||
if let observedColumnNames = readInfo[tableName] {
|
||||
return !updatedColumnNames.isDisjoint(with: observedColumnNames)
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Changes
|
||||
|
||||
|
||||
Reference in new issue
Block a user