Script.Isolated
Overview
Executes the given callback in isolated transaction.
void myScript.Isolated(fn: () => void)
Arguments
() => 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
Script.Isolated(function() {
// Do some operations in a new transaction.
});
throw new Error('some error');
Copyright © 2010 - 2023 Emakin. All rights reserved.