mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Fix two README typos
This commit is contained in:
1 parent
d7d3f87921
commit
d6e0dcafcb
1 file changed
+2
-2
@@ -2213,7 +2213,7 @@ if let player = try Player.fetchOne(db, key: 1)
|
||||
It is possible to [avoid useless updates](#record-comparison):
|
||||
|
||||
```swift
|
||||
if let player = try Player.fetchOne(db, key: 1) {
|
||||
if var player = try Player.fetchOne(db, key: 1) {
|
||||
// does not hit the database if score has not changed
|
||||
try player.updateChanges(db) {
|
||||
$0.score = 1000
|
||||
@@ -3060,7 +3060,7 @@ if newPlayer.databaseEquals(oldPlayer) == false {
|
||||
}
|
||||
```
|
||||
|
||||
> :point_up: **Note**: The comparison is performed on the database representation of records. As long as your record type adopts a PersistableRecord protocol, you don't need to care about Equatable.
|
||||
> :point_up: **Note**: The comparison is performed on the database representation of records. As long as your record type adopts the EncodableRecord protocol, you don't need to care about Equatable.
|
||||
|
||||
|
||||
### The `databaseChanges` and `hasDatabaseChanges` Methods
|
||||
|
||||
Reference in new issue
Block a user