public class QueryResult extends Object
View.execute(Iterable, Configuration), and
is primarily used for tests. To actually return a view result to the user, it is recommended
to use the View.executeRaw(Iterable, Configuration) method instead| Modifier and Type | Method and Description |
|---|---|
int |
getFilteredRowCount() |
int |
getTotalRowCount() |
String |
idAt(int ix)
Returns the ID (document ID) of the row in the given index
|
Object |
keyAt(int ix)
Returns the key for a row at a given index
|
int |
numKeyAt(int ix)
Like
keyAt(int) but casts the key as an integer |
int |
numValAt(int ix)
Returns the value of a given row as a number.
|
Map<String,Object> |
rowAt(int ix)
Get the raw JSON row at a given index
|
Object |
valueAt(int ix)
Returns the raw value for the row
|
public int getTotalRowCount()
total_rows field showing how many total items were indexedpublic int getFilteredRowCount()
public Map<String,Object> rowAt(int ix)
ix - The index of the row to fetchpublic Object keyAt(int ix)
ix - The index of the rowpublic int numKeyAt(int ix)
keyAt(int) but casts the key as an integerix - index of the rowpublic int numValAt(int ix)
ix - The index of the row. The row must have a value and it must be numericpublic String idAt(int ix)
ix - The index of the row. The row must be a result of a non-reduce querypublic Object valueAt(int ix)
ix - The index of the rowCopyright © 2017. All rights reserved.