Transaction

A transaction that allows to control the transaction and receive events.

package

Default

Methods

__construct

__construct() 

Set an handler to be called when the transaction is aborted.

abortHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Rollback the transaction and release the associated resources.

close() : void

Commit the current transaction.

commit( $arg0 = null) : void

commit()

Like @see \io\vertx\jphp\sqlclient\Transaction::commit with an handler to be notified when the transaction commit has completed

param $handler [callable] commit($handler)

Arguments

$arg0

callable

Create a prepared query.

prepare( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

preparedBatch

preparedBatch( $arg0,  $arg1,  $arg2) : $this

Arguments

$arg0

string

$arg1

array

$arg2

callable

Response

$this

param $sql [string] param $handler [callable] <b> preparedQuery($sql, $handler) </b>

preparedQuery( $arg0,  $arg1,  $arg2 = null) : $this

param $sql [string] param $arguments [Tuple] param $handler [callable] preparedQuery($sql, $arguments, $handler)

Arguments

$arg0

string

$arg1

callable | Tuple

$arg2

callable

Response

$this

query

query( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

Rollback the current transaction.

rollback( $arg0 = null) : void

rollback()

Like @see \io\vertx\jphp\sqlclient\Transaction::rollback with an handler to be notified when the transaction rollback has completed

param $handler [callable] rollback($handler)

Arguments

$arg0

callable