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(Handler<Void> handler)
Set an handler called when the connection is closed.
|
SqlConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
boolean |
isSSL() |
SqlConnection |
prepare(String sql,
Handler<AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
<R> SqlConnection |
preparedBatch(String sql,
List<Tuple> batch,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a createBatch.
|
SqlConnection |
preparedBatch(String sql,
List<Tuple> batch,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a createBatch.
|
<R> SqlConnection |
preparedQuery(String sql,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
SqlConnection |
preparedQuery(String sql,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> SqlConnection |
preparedQuery(String sql,
Tuple arguments,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
SqlConnection |
preparedQuery(String sql,
Tuple arguments,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> SqlConnection |
query(String sql,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Execute a simple query.
|
SqlConnection |
query(String sql,
Handler<AsyncResult<RowSet<Row>>> handler)
Execute a simple query.
|
SqlConnection prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)
sql - the sqlhandler - the handler notified with the prepared query asynchronouslySqlConnection exceptionHandler(Handler<Throwable> handler)
handler - the handlerSqlConnection closeHandler(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, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLhandler - the handler notified with the execution result<R> SqlConnection preparedQuery(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLcollector - the collectorhandler - the handler notified with the execution resultSqlConnection query(String sql, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClient<R> SqlConnection query(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientSqlConnection preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLarguments - the list of argumentshandler - the handler notified with the execution result<R> SqlConnection preparedQuery(String sql, Tuple arguments, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLarguments - the list of argumentscollector - the collectorhandler - the handler notified with the execution resultSqlConnection preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedBatch in interface SqlClientsql - the prepared query SQLbatch - the batch of tupleshandler - the handler notified with the execution result<R> SqlConnection preparedBatch(String sql, List<Tuple> batch, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedBatch in interface SqlClientsql - the prepared query SQLbatch - the batch of tuplescollector - the collectorhandler - the handler notified with the execution resultCopyright © 2019 Eclipse. All rights reserved.