SqlConnection

A connection to database server.

package

Default

Methods

__construct

__construct() 

Begin a transaction and returns a @see \io\vertx\jphp\sqlclient\Transaction for controlling and tracking this transaction.

begin() : \io\vertx\jphp\sqlclient\Transaction

When the connection is explicitely closed, any inflight transaction is rollbacked.

Response

\io\vertx\jphp\sqlclient\Transaction

the transaction instance

Close the current connection after all the pending commands have been processed.

close() : void

Set an handler called when the connection is closed.

closeHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

a reference to this, so the API can be used fluently

Set an handler called with connection errors.

exceptionHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

a reference to this, so the API can be used fluently

isSSL

isSSL() : boolean

Response

boolean

whether the connection uses SSL

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