Example usage for io.vertx.sqlclient Row getValue

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

Introduction

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

Prototype

Object getValue(String name);

Source Link

Document

Get an object value at pos .

Usage

From source file:examples.PgClientExamples.java

License:Apache License

public void typeMapping01(Pool pool) {
    pool.query("SELECT 1::BIGINT \"VAL\"", ar -> {
        RowSet<Row> rowSet = ar.result();
        Row row = rowSet.iterator().next();

        // Stored as java.lang.Long
        Object value = row.getValue(0);

        // Convert to java.lang.Integer
        Integer intValue = row.getInteger(0);
    });/*  ww  w. j a v a 2  s.co  m*/
}

From source file:examples.PgClientExamples.java

License:Apache License

public void typeMapping02(Pool pool) {
    pool.query("SELECT 1::BIGINT \"VAL\"", ar -> {
        RowSet<Row> rowSet = ar.result();
        Row row = rowSet.iterator().next();

        // Stored as java.lang.Long
        Object value = row.getValue(0);

        // Convert to java.lang.Integer
        Integer intValue = row.getInteger(0);
    });//  w  w  w.j a v a  2s .com
}