README.md

This commit is contained in:
Gwendal Roué committed 2016-02-10 09:05:14 +01:00
1 parent 15a65cfe93
commit 056eb22c7a
1 file changed
+12
+12
View File
@@ -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