From ec64ca286526738ba6904dfef8f3259913314949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 20 Dec 2016 06:15:03 +0100 Subject: [PATCH] Documentation & Changelog --- CHANGELOG.md | 19 ++++++++++++++++++- README.md | 7 +++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 903f31ee8..efd35e136 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ Release Notes ============= +## Next Version + +**Fixed** + +- [Transaction Observers](https://github.com/groue/GRDB.swift#database-changes-observation) are no longer blinded by the [truncate optimization](https://www.sqlite.org/lang_delete.html#truncateopt) (fixes [#156](https://github.com/groue/GRDB.swift/issues/156)) + +**New** + +- FetchedRecordsController no longer crashes whenever an error prevents it from looking for changes after a transaction has potentially modified the tracked request. Instead, it notifies its optional error handler: + + ```swift + controller.trackErrors { (controller, error) in + print("Missed a transaction because \(error)") + } + ``` + + ## 0.98.0 Released December 16, 2016 @@ -28,7 +45,7 @@ Released December 15, 2016 **New** -- Raw transaction and savepoint SQL statements are properly reflected in transaction observers, `Database.isInsideTransaction`, etc. +- Raw transaction and savepoint SQL statements are properly reflected in [transaction observers](https://github.com/groue/GRDB.swift#database-changes-observation), `Database.isInsideTransaction`, etc. ## 0.96.0 diff --git a/README.md b/README.md index 695eec089..2293d8ea2 100644 --- a/README.md +++ b/README.md @@ -4338,6 +4338,13 @@ controller.trackChanges( }) ``` +Whenever the fetched records controller can not look for changes after a transaction has potentially modified the tracked request, an error handler is called. The request observation is not stopped, though: future transactions may successfully be handled, and the notified changes will then be based on the last successful fetch. + +```swift +controller.trackErrors { (controller, error) in + print("Missed a transaction because \(error)") +} +``` ### Modifying the Fetch Request