From 10420e642604dc3ce4a63c3f19ca4e2e605fa7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 24 Jan 2021 18:15:26 +0100 Subject: [PATCH] Wording --- Documentation/Tutorial-DAL.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/Tutorial-DAL.md b/Documentation/Tutorial-DAL.md index 9eae84355..cd8537936 100644 --- a/Documentation/Tutorial-DAL.md +++ b/Documentation/Tutorial-DAL.md @@ -304,7 +304,10 @@ Note that the helper method calls the `execute(literal:)` method, which avoids [ SQL is just fine, but we can also make `Player` a [persistable record]. With persistable records, you do not have to write the SQL queries that perform common persistence operations. -The `Player` struct adopts the `MutablePersistableRecord` protocol, because the `player` database table has an autoincremented id. "Persistable": players can be inserted, updated and deleted. "Mutable": inserting a player modifies it by setting its id. +The `Player` struct adopts the `MutablePersistableRecord` protocol, because the `player` database table has an autoincremented id: + +- "Persistable": players can be inserted, updated and deleted. +- "Mutable": a player is modified (mutated) upon insertion, because its `id` property is set from the autoincremented SQLite id. Conformance to `MutablePersistableRecord` is almost free for types that adopt the standard [Encodable] protocol: