MySQLPool

A pool of MySQL connections.

package

Default

Methods

__construct

__construct() 

Borrow a connection from the pool and begin a transaction, the underlying connection will be returned to the pool when the transaction ends.

begin( $arg0) : void

Arguments

$arg0

callable

Close the pool and release the associated resources.

close() : void

Get a connection from the pool.

getConnection( $arg0) : void

Arguments

$arg0

callable

Like @see \io\vertx\jphp\mysqlclient\MySQLPool::pool with a default <code>poolOptions</code>.

pool( $arg0,  $arg1 = null,  $arg2 = null) : \io\vertx\jphp\mysqlclient\MySQLPool
static

param $connectionUri [string] pool($connectionUri)

Like @see \io\vertx\jphp\mysqlclient\MySQLPool::pool with connectOptions build from connectionUri.

param $connectionUri [string] param $poolOptions [PoolOptions | array] pool($connectionUri, $poolOptions)

Create a connection pool to the MySQL server configured with the given connectOptions and poolOptions.

param $connectOptions [MySQLConnectOptions | array] the options for the connection param $poolOptions [PoolOptions | array] the options for creating the pool pool($connectOptions, $poolOptions)

Like @see \io\vertx\jphp\mysqlclient\MySQLPool::pool with connectOptions build from connectionUri.

param $vertx [Vertx] param $connectionUri [string] param $poolOptions [PoolOptions | array] pool($vertx, $connectionUri, $poolOptions)

Like @see \io\vertx\jphp\mysqlclient\MySQLPool::pool with a specific instance.

param $vertx [Vertx] param $connectOptions [MySQLConnectOptions | array] param $poolOptions [PoolOptions | array] pool($vertx, $connectOptions, $poolOptions)

Arguments

$arg0

string | array | MySQLConnectOptions | Vertx

$arg1

string | array | PoolOptions | MySQLConnectOptions

$arg2

array | PoolOptions

Response

\io\vertx\jphp\mysqlclient\MySQLPool

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