From 48c431c0a91f01bd320c6aaa0dc4e85a8e3187d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 28 Jun 2016 13:07:53 +0200 Subject: [PATCH] Backup clears the schema cache of the target database --- GRDB/Core/DatabaseReader.swift | 2 ++ TODO.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GRDB/Core/DatabaseReader.swift b/GRDB/Core/DatabaseReader.swift index 899312e90..61e0c3d14 100644 --- a/GRDB/Core/DatabaseReader.swift +++ b/GRDB/Core/DatabaseReader.swift @@ -160,6 +160,8 @@ extension DatabaseReader { case let code: throw DatabaseError(code: code, message: dbDest.lastErrorMessage) } + + dbDest.clearSchemaCache() } } } diff --git a/TODO.md b/TODO.md index 410e8ff5e..d647a23a2 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,4 @@ - [ ] FetchRequest: return statement and adapter from a single method -- [ ] Clear the database cache on the target database of a backup - [ ] FetchedRecordsController: see if we can replace identity comparison function with a function that returns an Equatable value (beware the generics trouble). See if this can help optimize memory use, and use a sortedMerge() algorithm. - [ ] FetchedRecordsController: see if we can define a IdentifiableRecord protocol which would automatically feed FetchedRecordsController comparison function. - [ ] GRDBCipher: remove limitations on iOS or OS X versions