From 231906e5ea49efc5c7bc84077444ddd3a47e353f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 3 May 2018 10:17:38 +0200 Subject: [PATCH] WIP: GRDB2MigrationGuide.md --- Documentation/GRDB2MigrationGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/GRDB2MigrationGuide.md b/Documentation/GRDB2MigrationGuide.md index a76807e48..a3e8ee519 100644 --- a/Documentation/GRDB2MigrationGuide.md +++ b/Documentation/GRDB2MigrationGuide.md @@ -233,7 +233,7 @@ Side effect: you can no longer open explicit transactions inside a `write` block // GRDB 3: SQLite error 1 with statement `BEGIN DEFERRED TRANSACTION`: // cannot start a transaction within a transaction try dbPool.write { db in - db.inTransaction { ... } + try db.inTransaction { ... } } ``` @@ -250,7 +250,7 @@ try dbPool.write { db in } ``` -Now `write` automatically wraps your changes in a transaction, with the guarantee that concurrent reads can't see them until they are all written to disk. +Since `write` now wraps your changes in a transaction, you have the guarantee that concurrent reads can't see them until they are all written to disk. ## If You Use Database Snapshots