本文整理匯總了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();
}
});
}