mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
1 file changed
+1
-1
@@ -2280,7 +2280,7 @@ let spain = try Country.fetchOne(db, key: "ES") // Country?
|
||||
To update a record in the database, call the `update` method:
|
||||
|
||||
```swift
|
||||
if let player = try Player.fetchOne(db, key: 1)
|
||||
if let player = try Player.fetchOne(db, key: 1) {
|
||||
player.score = 1000
|
||||
try player.update(db)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user