private QueryIterator forestQuery(QueryOptions options) throws ForestException {
        // NOTE: Geo & FullText queries are not supported yet
        if (options == null)
            options = new QueryOptions();
        long skip = options.getSkip();
        long limit = options.getLimit();
        boolean descending = options.isDescending();
        boolean inclusiveStart = options.isInclusiveStart();
        boolean inclusiveEnd = options.isInclusiveEnd();
        if (options.getKeys() != null && options.getKeys().size() > 0) {
            Object[] keys = options.getKeys().toArray();
            return _view.query(
                    skip,
                    limit,
                    descending,
                    inclusiveStart,
                    inclusiveEnd,
                    keys);
        } else {
            Object endKey = Misc.keyForPrefixMatch(options.getEndKey(),
                    options.getPrefixMatchLevel());
            Object startKey = options.getStartKey();
            String startKeyDocID = options.getStartKeyDocId();
            String endKeyDocID = options.getEndKeyDocId();
            return _view.query(
                    skip,
                    limit,
                    descending,
                    inclusiveStart,
                    inclusiveEnd,
                    startKey,
                    endKey,
                    startKeyDocID,
                    endKeyDocID);
        }
    }
private QueryIterator forestQuery ( QueryOptions options ) throws ForestException { if ( options == null ) options = new QueryOptions ( ) ; long skip = options . getSkip ( ) ; long limit = options . getLimit ( ) ; boolean descending = options . isDescending ( ) ; boolean inclusiveStart = options . isInclusiveStart ( ) ; boolean inclusiveEnd = options . isInclusiveEnd ( ) ; if ( options . getKeys ( ) != null && options . getKeys ( ) . size ( ) > 0 ) { Object [ ] keys = options . getKeys ( ) . toArray ( ) ; return _view . query ( skip , limit , descending , inclusiveStart , inclusiveEnd , keys ) ; } else { Object endKey = Misc . keyForPrefixMatch ( options . getEndKey ( ) , options . getPrefixMatchLevel ( ) ) ; Object startKey = options . getStartKey ( ) ; String startKeyDocID = options . getStartKeyDocId ( ) ; String endKeyDocID = options . getEndKeyDocId ( ) ; return _view . query ( skip , limit , descending , inclusiveStart , inclusiveEnd , startKey , endKey , startKeyDocID , endKeyDocID ) ; } }
Starts a view query, returning a CBForest enumerator.
- (C4QueryEnumerator*) _forestQueryWithOptions: (CBLQueryOptions*)options
error: (C4Error*)outError