mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
README.md
This commit is contained in:
1 parent
89cbb1ba09
commit
4f876e720b
1 file changed
+2
-2
@@ -667,11 +667,11 @@ try dbQueue.inTransaction { db in
|
||||
|
||||
// Insert
|
||||
let person = Person(name: "Arthur", age: 41)
|
||||
try person.insert(db) // save(db) would insert when the primary key is not set.
|
||||
try person.insert(db)
|
||||
|
||||
// Update
|
||||
person.age = 42
|
||||
try person.update(db) // save(db) would update when the primary key is set.
|
||||
try person.update(db)
|
||||
|
||||
// Reload
|
||||
person.age = 666
|
||||
|
||||
Reference in new issue
Block a user