mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-05 23:10:28 +00:00
Add note about transaction handling
This commit is contained in:
parent
1c0341de51
commit
630b98520f
@ -501,6 +501,8 @@ SqlTiddlerDatabase.prototype.getRecipeBags = function(recipename) {
|
||||
Execute the given function in a transaction, committing if successful but rolling back if an error occurs. Returns whatever the given function returns.
|
||||
|
||||
Calls to this function can be safely nested, but only the topmost call will actually take place in a transaction.
|
||||
|
||||
TODO: better-sqlite3 provides its own transaction method which we should be using if available
|
||||
*/
|
||||
SqlTiddlerDatabase.prototype.transaction = function(fn) {
|
||||
const alreadyInTransaction = this.transactionDepth > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user