MySQLConnection

A connection to MySQL server.

package

Default

Methods

__construct

__construct() 

Begin a transaction and returns a for controlling and tracking this transaction.

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

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

Response

\io\vertx\jphp\mysqlclient\Transaction

the transaction instance

Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.

changeUser( $arg0,  $arg1) : $this

Arguments

$arg0

array | MySQLConnectOptions

$arg1

callable

Response

$this

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

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

close() : void

closeHandler

closeHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Create a connection to MySQL server with the given <code>connectOptions</code>.

connect( $arg0,  $arg1,  $arg2) : void
static

param $vertx [Vertx] the vertx instance param $connectOptions [MySQLConnectOptions | array] the options for the connection param $handler [callable] the handler called with the connection or the failure connect($vertx, $connectOptions, $handler)

Like @see \io\vertx\jphp\mysqlclient\MySQLConnection::connect with options build from connectionUri.

param $vertx [Vertx] param $connectionUri [string] param $handler [callable] connect($vertx, $connectionUri, $handler)

Arguments

$arg0

Vertx

$arg1

string | array | MySQLConnectOptions

$arg2

callable

Send a DEBUG command to dump debug information to the server's stdout.

debug( $arg0) : $this

Arguments

$arg0

callable

Response

$this

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

exceptionHandler

exceptionHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Send a STATISTICS command to get a human readable string of the server internal status.

getInternalStatistics( $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

Send a PING command to check if the server is alive.

ping( $arg0) : $this

Arguments

$arg0

callable

Response

$this

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

prepare

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

Send a RESET_CONNECTION command to reset the session state.

resetConnection( $arg0) : $this

Arguments

$arg0

callable

Response

$this

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

Send a SET_OPTION command to set options for the current connection.

setOption( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

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

Send a INIT_DB command to change the default schema of the connection.

specifySchema( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

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