Isolated¶
Executes the given callback function in an isolated transaction.
1 |
|
Parameters¶
() => void fn
The callback function to execute.
Remarks¶
This method is useful when you want to execute some operations in a new transaction without affecting the current transaction result.
The callback function is executed in a new isolated transaction, and operations within the callback are always committed, even if the current transaction is rolled back.
If the callback throws an exception, both the current transaction and the isolated transaction are rolled back.
Example¶
1 2 3 4 |
|