PreparedQuery

A prepared query.

package

Default

Methods

__construct

__construct() 

Execute a batch.

batch( $arg0,  $arg1) : $this

Arguments

$arg0

array

$arg1

callable

Response

$this

the createBatch

Close the prepared query and release its resources.

close( $arg0 = null) : void

close()

Like @see \io\vertx\jphp\sqlclient\PreparedQuery::close but notifies the completionHandler when it's closed.

param $completionHandler [callable] close($completionHandler)

Arguments

$arg0

callable

Execute the prepared query with a cursor and createStream the result. The createStream opens a cursor with a <code>fetch</code> size to fetch the results.

createStream( $arg0,  $arg1) : \io\vertx\jphp\sqlclient\RowStream<Row>

Note: this requires to be in a transaction, since cursors require it.

Arguments

$arg0

integer

$arg1

Tuple

Response

\io\vertx\jphp\sqlclient\RowStream

the createStream

<b> cursor() </b>

cursor( $arg0 = null) : \io\vertx\jphp\sqlclient\Cursor

Create a cursor with the provided arguments.

param $args [Tuple] the list of arguments cursor($args)

Arguments

$arg0

Tuple

Response

\io\vertx\jphp\sqlclient\Cursor

create a query cursor with a {@code fetch} size and empty arguments

Calls @see \io\vertx\jphp\sqlclient\PreparedQuery::execute with an empty tuple argument.

execute( $arg0,  $arg1 = null) : $this

param $handler [callable] execute($handler)

Create a cursor with the provided arguments.

param $args [Tuple] the list of arguments param $handler [callable] execute($args, $handler)

Arguments

$arg0

callable | Tuple

$arg1

callable

Response

$this