Hi all!
I’m having strange issues with CB views:
bucket
.query(query)
.flatMap(AsyncViewResult::rows)
.map((AsyncViewRow arg00) -> arg00.id())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
_response.resume(computations.toString());
}
@Override
public void onError(Throwable thrwbl) {
_response.cancel();
}
@Override
public void onNext(String t) {
computations.add(t);
}
});
I’m using jersey for my API and the previous code does not work (connection closed without output).
BUT this one is working:
Observble.from( bucket
.query(query)
.flatMap(AsyncViewResult::rows)
.map((AsyncViewRow arg00) -> arg00.id()).toList().toBlocking().single())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
_response.resume(computations.toString());
}
@Override
public void onError(Throwable thrwbl) {
_response.cancel();
}
@Override
public void onNext(String t) {
computations.add(t);
}
});
Could someone help me ?