List of usage examples for io.vertx.mysqlclient MySQLClient LAST_INSERTED_ID
PropertyKind LAST_INSERTED_ID
To view the source code for io.vertx.mysqlclient MySQLClient LAST_INSERTED_ID.
Click Source Link
From source file:examples.MySQLClientExamples.java
public void lastInsertId(SqlClient client) { client.query("INSERT INTO test(val) VALUES ('v1')", ar -> { if (ar.succeeded()) { RowSet<Row> rows = ar.result(); long lastInsertId = rows.property(MySQLClient.LAST_INSERTED_ID); System.out.println("Last inserted id is: " + lastInsertId); } else {// www . j av a 2s .c o m System.out.println("Failure: " + ar.cause().getMessage()); } }); }