Example usage for io.vertx.sqlclient Row getBoolean

List of usage examples for io.vertx.sqlclient Row getBoolean

Introduction

In this page you can find the example usage for io.vertx.sqlclient Row getBoolean.

Prototype

Boolean getBoolean(String name);

Source Link

Document

Get a boolean value at pos .

Usage

From source file:examples.MySQLClientExamples.java

public void booleanExample01(SqlClient client) {
    client.query("SELECT graduated FROM students WHERE id = 0", ar -> {
        if (ar.succeeded()) {
            RowSet<Row> rowSet = ar.result();
            for (Row row : rowSet) {
                int pos = row.getColumnIndex("graduated");
                Byte value = row.get(Byte.class, pos);
                Boolean graduated = row.getBoolean("graduated");
            }// w  w w .j a v a 2s  .  c  o m
        } else {
            System.out.println("Failure: " + ar.cause().getMessage());
        }
    });
}

From source file:examples.PgClientExamples.java

License:Apache License

public void tsQuery01Example(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("Match : " + row.getBoolean(0));
                    }/*from www . ja va 2  s  .com*/
                } else {
                    System.out.println("Failure: " + ar.cause().getMessage());
                }
            });
}

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");

    // .../*from ww  w.  j a  v a  2s . c  o m*/

}