本文整理汇总了Java中com.couchbase.client.java.view.AsyncViewRow类的典型用法代码示例。如果您正苦于以下问题:Java AsyncViewRow类的具体用法?Java AsyncViewRow怎么用?Java AsyncViewRow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AsyncViewRow类属于com.couchbase.client.java.view包,在下文中一共展示了AsyncViewRow类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAllKeys
import com.couchbase.client.java.view.AsyncViewRow; //导入依赖的package包/类
private Observable<String> getAllKeys() {
String[] viewInfo = checkAndGetViewInfo();
return bucket.async()
.query(ViewQuery.from(viewInfo[0], viewInfo[1]))
.flatMap(new Func1<AsyncViewResult, Observable<AsyncViewRow>>() {
@Override
public Observable<AsyncViewRow> call(AsyncViewResult asyncViewResult) {
return asyncViewResult.rows();
}
})
.map(new Func1<AsyncViewRow, String>() {
@Override
public String call(AsyncViewRow asyncViewRow) {
return asyncViewRow.id();
}
});
}