IK
Size: a a a
IK
BV
BV
BV
IS
IS
BV
BV
IS
VP
@Get(value = «/users/demo», produces = MediaType.APPLICATION_JSON)
public Flowable<User> getDemoUsers() {
String query = dslContext.select(USERS.ID, USERS.EMAIL)
.from(USERS)
.where(USERS.EMAIL.like(«%demo%»))
.orderBy(USERS.ID)
.getSQL(ParamType.INLINED);
return Flowable.fromFuture(connection.inTransaction(c -> connection.sendQuery(query)))
.flatMap(result -> Flowable.fromIterable(() -> result.getRows().iterator()))
.map(r -> new User(r.getLong(USERS.ID.getName()), r.getString(USERS.EMAIL.getName())))
.doOnError(error -> {
throw new RuntimeException(error);
});
}
d
d
VP
d
BV
IS
BV
BV
BV
BV