Skip to content

Isolated

Executes the given callback in isolated transaction.

1
myScript.Isolated(fn: () => void):void

Parameters

() => void fn
    The callback to execute.

Remarks

This method is useful when you want to execute some operations in a new transaction without current transaction result.
The callback function is executed in a new isolated transaction and operations in callback is always committed even current transaction is roll backed.
When callback is throws exception current and isolated transaction is roll backs.

Example

```js Script.Isolated(function() { // Do some operations in a new transaction. }); throw new Error('some error');