You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/04/12 09:42:33 UTC

[Couchdb Wiki] Update of "How to page through results" by WoutMertens

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by WoutMertens:
http://wiki.apache.org/couchdb/How_to_page_through_results

The comment on the change is:
explained skip=1

------------------------------------------------------------------------------
  How to page through results.
  
- It is best to follow links when paginating. The next link is the key that showed up last, in the current query. Use it as startkey, and supply a limit (currently "count") parameter.
+ It is best to follow links when paginating. The next link is the key that showed up last, in the current query. Use it as startkey, and supply a limit and a skip value of 1.
+ 
+ So if you requested 10 results using ''http://couchdb/db/_design/mydesign/_view/myview?limit=10'', then you would get the next 10 results by requesting ''http://couchdb/db/_design/mydesign/_view/myview?limit=10&startkey=lastkey&skip=1'' , where lastkey is the value of the last key you received.
  
  There are some implementations of paginating. This is a special purpose one in Ruby which give you all results with the same key, grouped together.