You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+2
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,8 @@ insertMany([
72
72
73
73
Transaction functions can be called from inside other transaction functions. When doing so, the inner transaction becomes a [savepoint](https://www.sqlite.org/lang_savepoint.html).
74
74
75
+
If an error is thrown inside of a nested transaction function, the nested transaction function will roll back to the state just before the savepoint and rethrow the error. If the error is not caught in the outer transaction function, this will cause the outer transaction function to roll back as well.
76
+
75
77
```js
76
78
constnewExpense=db.prepare('INSERT INTO expenses (note, dollars) VALUES (?, ?)');
0 commit comments