README.md

This commit is contained in:
Gwendal Roué committed 2016-04-28 08:35:55 +02:00
1 parent 9f4b03c14f
commit a9a06a0652
1 file changed
+4 -2
+4 -2
View File
@@ -2256,8 +2256,10 @@ try dbQueue.inTransaction { db in
Database statements that are executed outside of an explicit transaction do not drop off the radar:
```swift
try db.execute("INSERT ...") // 1. didChange, 2. willCommit, 3. didCommit
try db.execute("UPDATE ...") // 4. didChange, 5. willCommit, 6. didCommit
try dbQueue.inDatabase { db in
try db.execute("INSERT ...") // 1. didChange, 2. willCommit, 3. didCommit
try db.execute("UPDATE ...") // 4. didChange, 5. willCommit, 6. didCommit
}
```
**Eventual errors** thrown from `databaseWillCommit` are exposed to the application code: