From a71e08ad2a83eef7a98e7e5c5a8a20e807248255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 18 Aug 2016 11:16:47 +0200 Subject: [PATCH 1/2] TODO: attempt to read from the database in DatabasePool.init() and throw eventual error (see #99) --- TODO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.md b/TODO.md index 71ed9375a..7aaf3bd6f 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,7 @@ - [ ] @hdlj: Extensibility of the Query Interface - [ ] @hdlj: FetchedRecordsController throttling - [ ] @hdlj: Check RAM pressure +- [ ] DatabasePool: attempt to read from the database in DatabasePool.init(). Don't crash, but throw eventual error instead. (Related issue: https://github.com/groue/GRDB.swift/issues/99) - [ ] Test Row(SQLColumn) - [ ] Persistable partial update: allow models whose persistentDictionary only contains a subset of table columns (and count of default value) - [ ] What is the behavior inTransaction and inSavepoint behaviors in case of commit error? Code looks like we do not rollback, leaving the app in a weird state (out of Swift transaction block with a SQLite transaction that may still be opened). From 27b9cbda38ce844661b97d35b22e4ca6cf1d29ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 19 Aug 2016 08:59:06 +0200 Subject: [PATCH 2/2] Documentation --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4d72c59c6..c7dc37acd 100644 --- a/README.md +++ b/README.md @@ -1082,9 +1082,8 @@ row.value(atIndex: 0) as Grape? // fatal error: could not convert "Syrah" to Gr row.value(atIndex: 0) as Grape // fatal error: could not convert "Syrah" to Grape. let dbv = row.databaseValue(atIndex: 0) -dbv.value() as String // "Syrah" -dbv.value() as Grape? // fatal error: could not convert "Syrah" to Grape. -Grape.fromDatabaseValue(dbv) // nil +String.fromDatabaseValue(dbv) // "Syrah" +Grape.fromDatabaseValue(dbv) // nil ```