use of org.apache.gora.couchdb.query.CouchDBResult in project gora by apache.
the class CouchDBStore method execute.
/**
* Execute the query and return the result.
*/
@Override
public Result<K, T> execute(Query<K, T> query) {
query.setFields(getFieldsToQuery(query.getFields()));
final ViewQuery viewQuery = new ViewQuery().allDocs().includeDocs(true).startKey(query.getStartKey()).endKey(query.getEndKey()).limit(//FIXME GORA have long value but ektorp client use integer
Ints.checkedCast(query.getLimit()));
CouchDBResult<K, T> couchDBResult = new CouchDBResult<>(this, query, db.queryView(viewQuery, Map.class));
return couchDBResult;
}
Aggregations