public interface SqlConnection extends SqlClient
Modifier and Type | Method and Description |
---|---|
Transaction |
begin()
Begin a transaction and returns a
Transaction for controlling and tracking
this transaction. |
void |
close()
Close the current connection after all the pending commands have been processed.
|
SqlConnection |
closeHandler(io.vertx.core.Handler<Void> handler)
Set an handler called when the connection is closed.
|
SqlConnection |
exceptionHandler(io.vertx.core.Handler<Throwable> handler)
Set an handler called with connection errors.
|
boolean |
isSSL() |
SqlConnection |
prepare(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
<R> SqlConnection |
preparedBatch(String sql,
List<Tuple> batch,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a createBatch.
|
SqlConnection |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a createBatch.
|
<R> SqlConnection |
preparedQuery(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
SqlConnection |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> SqlConnection |
preparedQuery(String sql,
Tuple arguments,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
SqlConnection |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> SqlConnection |
query(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Execute a simple query.
|
SqlConnection |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Execute a simple query.
|
SqlConnection prepare(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedQuery>> handler)
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslySqlConnection exceptionHandler(io.vertx.core.Handler<Throwable> handler)
handler
- the handlerSqlConnection closeHandler(io.vertx.core.Handler<Void> handler)
handler
- the handlerTransaction begin()
Transaction
for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.boolean isSSL()
void close()
SqlConnection preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLhandler
- the handler notified with the execution result<R> SqlConnection preparedQuery(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLcollector
- the collectorhandler
- the handler notified with the execution resultSqlConnection query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
<R> SqlConnection query(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
SqlConnection preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLarguments
- the list of argumentshandler
- the handler notified with the execution result<R> SqlConnection preparedQuery(String sql, Tuple arguments, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLarguments
- the list of argumentscollector
- the collectorhandler
- the handler notified with the execution resultSqlConnection preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
preparedBatch
in interface SqlClient
sql
- the prepared query SQLbatch
- the batch of tupleshandler
- the handler notified with the execution result<R> SqlConnection preparedBatch(String sql, List<Tuple> batch, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedBatch
in interface SqlClient
sql
- the prepared query SQLbatch
- the batch of tuplescollector
- the collectorhandler
- the handler notified with the execution resultCopyright © 2019 Eclipse. All rights reserved.