FetchedRecordsController documentation

This commit is contained in:
Gwendal Roué committed 2016-04-02 08:41:19 +02:00
1 parent dc942c5734
commit e132b54c9f
2 files changed
+7 -3

No files matched your search

+7 -2
View File
@@ -332,15 +332,20 @@ public final class FetchedRecordsController<Record: RowConvertible> {
}
/// Updates the fetch request, and notifies the delegate of changes in the
/// fetched records.
/// fetched records if delegate is not nil, and performFetch() has been
/// called.
public func setRequest<T>(request: FetchRequest<T>) {
// We don't provide a setter for the request property because we need a
// non-optional request.
// Retype the fetch request
let request: FetchRequest<Record> = FetchRequest(query: request.query)
self.source = DatabaseSource.FetchRequest(request)
}
/// Updates the fetch request, and notifies the delegate of changes in the
/// fetched records.
/// fetched records if delegate is not nil, and performFetch() has been
/// called.
public func setSQL(sql: String, arguments: StatementArguments? = nil) {
self.source = DatabaseSource.SQL(sql, arguments)
}
-1
View File
@@ -1,6 +1,5 @@
- [ ] Make FetchRequest adopt Equatable
- [ ] FetchedRecordsController needs a property that disables changes computation and calls to delegate.controller(_:didChangeRecord:withEvent:).
- [ ] Turn FetchedRecordsController.setRequest into the request property setter.
- [ ] DatabaseValue.failableValue() is not a nice name.
- [ ] Support for resource values (see https://developer.apple.com/library/ios/qa/qa1719/_index.html)
- [ ] DOC: Write an app like http://www.appcoda.com/swiftydb/ ?