mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Merge pull request #70 from schveiguy/patch-1
Add description of rollback without throwing error
This commit is contained in:
commit
70deb7b388
1 file changed
+1
-1
@@ -1060,7 +1060,7 @@ try dbQueue.inTransaction { db in
|
||||
}
|
||||
```
|
||||
|
||||
The transaction is rollbacked if an error is thrown within the transaction body, and that error is rethrown by the inTransaction method.
|
||||
The transaction is rollbacked if an error is thrown within the transaction body, and that error is rethrown by the inTransaction method. If you return `TransactionCompletion.Rollback` from your closure, the transaction is also rolled back, but no error is thrown.
|
||||
|
||||
If you want to insert a transaction between other database statements, you can use the Database.inTransaction() function:
|
||||
|
||||
|
||||
Reference in new issue
Block a user