mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
FetchedRecordsController documentation
This commit is contained in:
1 parent
dc942c5734
commit
e132b54c9f
2 files changed
+7
-3
No files matched your search
@@ -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,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/ ?
|
||||
|
||||
Reference in new issue
Block a user