RunInSeparatePrimary (open)
Run a function in a separate transaction
Syntax
LOADLIB "mod::system/lib/database.whlib";
VARIANT FUNCTION RunInSeparatePrimary(FUNCTION PTR func, RECORD options)
Parameters
FUNCTION PTR func
Function to invoke
RECORD options
Options
openprimary
If false, doesn't open a new primary right away, only closes it if opened inside the callback (default: true)
work
If true, open and commit work (unless the function throws)
Return value
VARIANT
Return value of the function