I was able to get RETURNING to work with JDBCPool as follows:
jdbcPool
.preparedQuery("INSERT INTO test VALUES (?) RETURNING *")
.execute(Tuple.
wrap(Arrays.asList('John Doe')))
.onSuccess(rows -> {
if (rows.property(JDBCPool.
GENERATED_KEYS) != null) {
final Row insertedRow = rowSet.property(JDBCPool.
GENERATED_KEYS);
final JsonObject insertedRowJson = new JsonObject();
for (int i = 0; i < insertedRow.size(); i++) {
final String colName = insertedRow.getColumnName(i);
final Object colValue = insertedRow.getValue(colName);
insertedRowJson.put(colName, colValue);
}
System.out.println(insertedRowJson);
}
}
The open question still remains: Why can't I get a connection using PgPool without specifying ssl params when the same with JDBCPool works with: "jdbc:postgresql://host:port/database".
Can someone please help? Thanks.