mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
README.md
This commit is contained in:
1 parent
15a65cfe93
commit
056eb22c7a
1 file changed
+12
@@ -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
|
||||
|
||||
Reference in new issue
Block a user