From 5c70477a04083d5b98cd2d9dca945cae5fb926bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 24 Jan 2021 18:01:58 +0100 Subject: [PATCH] SwiftUI use in-memory databases --- Documentation/Tutorial-DAL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Tutorial-DAL.md b/Documentation/Tutorial-DAL.md index aa89755e5..9346bc26f 100644 --- a/Documentation/Tutorial-DAL.md +++ b/Documentation/Tutorial-DAL.md @@ -32,7 +32,7 @@ In this chapter, we introduce the `AppDatabase` service. It is the class that gr We'll make it possible to fetch the list of players, insert new players, as well as other application needs. But not all database operations will be possible. For example, setting up the database schema is the strict privilege of `AppDatabase`, not of the rest of the application. -The `AppDatabase` service accesses the SQLite database through a GRDB [database connection]. We'd like the application to use a `DatabasePool`, because this connection leverages the advantages of the SQLite [WAL mode]. On the other side, we'd prefer application tests to run as fast as possible, with an in-memory database provided by a `DatabaseQueue`. +The `AppDatabase` service accesses the SQLite database through a GRDB [database connection]. We'd like the application to use a `DatabasePool`, because this connection leverages the advantages of the SQLite [WAL mode]. On the other side, we'd prefer application tests to run as fast as possible, with an in-memory database provided by a `DatabaseQueue`. SwiftUI previews will also run with in-memory databases. Pools and queues share a common protocol, `DatabaseWriter`, and this is what our `AppDatabase` service needs: