List of usage examples for io.vertx.sqlclient PreparedQuery execute
@Fluent PreparedQuery execute(Tuple args, Handler<AsyncResult<RowSet<Row>>> handler);
From source file:examples.SqlClientExamples.java
License:Apache License
public void usingConnections02(SqlConnection connection) { connection.prepare("SELECT * FROM users WHERE first_name LIKE $1", ar1 -> { if (ar1.succeeded()) { PreparedQuery pq = ar1.result(); pq.execute(Tuple.of("julien"), ar2 -> { if (ar2.succeeded()) { // All rows RowSet<Row> rows = ar2.result(); }/*from w ww.j a va 2s . co m*/ }); } }); }
From source file:examples.SqlClientExamples.java
License:Apache License
public void usingConnections02(SqlConnection connection) { connection.prepare("SELECT * FROM users WHERE first_name LIKE ?", ar1 -> { if (ar1.succeeded()) { PreparedQuery pq = ar1.result(); pq.execute(Tuple.of("julien"), ar2 -> { if (ar2.succeeded()) { // All rows RowSet<Row> rows = ar2.result(); }/*from ww w . j ava 2 s.c o m*/ }); } }); }