From cc5726577eaebcb343b623bbb2ca870ce1e33b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 22 Mar 2016 20:34:44 +0100 Subject: [PATCH] README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a0a3f27e2..915ceb8ed 100644 --- a/README.md +++ b/README.md @@ -2516,7 +2516,7 @@ GRDB ships with support for two concurrency modes: - [DatabaseQueue](#database-queues) opens a single database connection, and serializes all database accesses. - [DatabasePool](#database-pools) manages a pool of several database connections, serializes writes, and allows concurrent reads and writes. -**Rule 1**: Your application should have a unique instance of DatabaseQueue or DatabasePool connected to a database file. You may experience concurrency trouble if you do otherwise. +**Rule 1: Your application should have a unique instance of DatabaseQueue or DatabasePool connected to a database file. You may experience concurrency trouble if you do otherwise.** Now let's talk about the consistency of your data: you generally want to prevent you application threads to conflict. @@ -2544,7 +2544,7 @@ let count1 = PointOfInterest.fetchCount(dbQueue) // or dbPool let count2 = PointOfInterest.fetchCount(dbQueue) // or dbPool ``` -**Rule 2**: Use the `inDatabase`, `inTransaction`, `read`, `write` and `writeInTransaction` safe methods unless you know what you are doing. +**Rule 2: Use the safe `inDatabase`, `inTransaction`, `read`, `write` and `writeInTransaction` methods unless you know what you are doing.** ### Advanced Concurrency