use of io.vertx.reactivex.sqlclient.Row in project micronaut-sql by micronaut-projects.
the class PgHealthIndicator method getResult.
@Override
public Publisher<HealthResult> getResult() {
return client.query(QUERY).rxExecute().map(rows -> {
HealthResult.Builder status = HealthResult.builder(NAME, HealthStatus.UP);
Row row = rows.iterator().next();
status.details(Collections.singletonMap("version", row.getString(0)));
return status.build();
}).onErrorReturn(this::buildErrorResult).toFlowable();
}
use of io.vertx.reactivex.sqlclient.Row in project micronaut-sql by micronaut-projects.
the class MySQLHealthIndicator method getResult.
@Override
public Publisher<HealthResult> getResult() {
return client.query(QUERY).rxExecute().map(rows -> {
HealthResult.Builder status = HealthResult.builder(NAME, HealthStatus.UP);
Row row = rows.iterator().next();
status.details(Collections.singletonMap("version", row.getString(0)));
return status.build();
}).onErrorReturn(this::buildErrorResult).toFlowable();
}
Aggregations