JavascriptTransaction
extends Transaction
in package
FinalYes
Manages Javascript transactions
Tags
Table of Contents
Properties
- $action : string
- Javascript code on a string to be executed on server
- $connection : Connection
- Connection object
- $defaultOptions : array<string|int, mixed>
- Some default options for transaction Sets by default, 32MB as transaction size limit and waits server write all data on disk before return any response.
- $options : array<string|int, mixed>
- StreamTransaction options
Methods
- __construct() : mixed
- JavascriptTransaction constructor.
- execute() : mixed
- Execute the transaction.
Properties
$action
Javascript code on a string to be executed on server
protected
string
$action
$connection
Connection object
protected
Connection
$connection
$defaultOptions
Some default options for transaction Sets by default, 32MB as transaction size limit and waits server write all data on disk before return any response.
protected
array<string|int, mixed>
$defaultOptions
= ['maxTransactionSize' => 32000000, 'waitForSync' => true, 'allowImplicit' => false, 'lockTimeout' => 30]
Also, set by default a lock timeout of 30 seconds.
$options
StreamTransaction options
protected
array<string|int, mixed>
$options
Methods
__construct()
JavascriptTransaction constructor.
public
__construct(Connection $connection, string $action[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $connection : Connection
-
Connection object to use.
- $action : string
-
JavaScript code to execute on server
- $options : array<string|int, mixed> = []
-
Transaction options.
Tags
execute()
Execute the transaction.
public
execute() : mixed
Throws an exception if any error is detected.
Tags
Return values
mixed —The result value of transaction