From 056eb22c7acac637e1f4ec1c02100f3f5215c63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 10 Feb 2016 09:05:14 +0100 Subject: [PATCH] README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6cdb9c028..fd79ebf13 100644 --- a/README.md +++ b/README.md @@ -1279,6 +1279,18 @@ try dbQueue.inDatabase { db in } ``` +[Record](#record-class) subclasses track changes: + +```swift +try dbQueue.inDatabase { db in + let person = Person.fetchOne(db, key: 1)! + person.name = "Arthur" + if person.hasPersistentChangedValues { + try person.update(db) + } +} +``` + For batch updates, you have to execute an [SQL query](#executing-updates): ```swift