List of usage examples for io.vertx.sqlclient Row getString
String getString(String name);
From source file:examples.PgClientExamples.java
License:Apache License
public void customType01Example(SqlClient client) { client.preparedQuery("SELECT address, (address).city FROM address_book WHERE id=$1", Tuple.of(3), ar -> { if (ar.succeeded()) { RowSet<Row> rows = ar.result(); for (Row row : rows) { System.out.println("Full Address " + row.getString(0) + ", City " + row.getString(1)); }/*from ww w. j a va2 s. c om*/ } else { System.out.println("Failure: " + ar.cause().getMessage()); } }); }
From source file:examples.PgClientExamples.java
License:Apache License
public void tsQuery02Example(SqlClient client) { client.preparedQuery("SELECT to_tsvector( $1 ), to_tsquery( $2 )", Tuple.of("fat cats ate fat rats", "fat & rat"), ar -> { if (ar.succeeded()) { RowSet<Row> rows = ar.result(); for (Row row : rows) { System.out.println("Vector : " + row.getString(0) + ", query : " + row.getString(1)); }/* www. ja v a2s . c o m*/ } else { System.out.println("Failure: " + ar.cause().getMessage()); } }); }
From source file:examples.SqlClientExamples.java
License:Apache License
public void queries03(SqlClient client) { client.preparedQuery("SELECT first_name, last_name FROM users", ar -> { if (ar.succeeded()) { RowSet<Row> rows = ar.result(); for (Row row : rows) { System.out.println("User " + row.getString(0) + " " + row.getString(1)); }//from w ww .ja va 2s . c om } else { System.out.println("Failure: " + ar.cause().getMessage()); } }); }
From source file:examples.SqlClientExamples.java
License:Apache License
public void queries05(Row row) { System.out.println("User " + row.getString(0) + " " + row.getString(1)); }
From source file:examples.SqlClientExamples.java
License:Apache License
public void queries06(Row row) { System.out.println("User " + row.getString("first_name") + " " + row.getString("last_name")); }
From source file:examples.SqlClientExamples.java
License:Apache License
public void queries07(Row row) { String firstName = row.getString("first_name"); Boolean male = row.getBoolean("male"); Integer age = row.getInteger("age"); // ...// w w w . j ava 2 s . c o m }