Hi Paul,

On 15 Mar 2009, at 23:40, Paul Davis wrote:

* https://issues.apache.org:443/jira/browse/COUCHDB-183
No pagination in Futon for reduce views

Looks like Jason Davies has got a couple patches up for this one. I
haven't tried applying them but he's left a note saying that there's a
todo item for blank pages at the beginning or end of the key range.
I'd defer to Christopher Lenz on this one.


Yep, I would recommend at least applying the patch as it stands (assuming cmlenz is happy with it) as it is extremely useful for anyone using reduce views in Futon.

The only remaining issue is that you can't tell if you are at the end of the key range as reduce views don't return "total_rows", hence it will just show zero rows if you carry on clicking "Next Page" (if descending=true is used this happens at the beginning instead of the end). The fix would be to fetch rows_per_page + 1 and check if returned_rows.length is less than this.

Unless there are any objections to the above approach, I don't mind spending a bit of time tomorrow afternoon working up an updated patch so we can get this nailed.

--
Jason Davies

www.jasondavies.com

Reply via email to