incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject list iterators
Date Thu, 04 Jun 2009 05:31:11 GMT
Couchers,

I've been hacking on that list iterator stuff I'd been talking about.
Here's the branch (for now)
http://github.com/jchris/couchdb/tree/list_iterators

The difference with this branch is that you call getRow() when you
want another view row, and you can send() a chunk (string) whenever
you want, instead of being constrained to functions which had to
return after each call. This gives you more freedom to manage your own
state between calls.

Here's an example of what the syntax comes out like
http://github.com/jchris/couchdb/blob/5345878fad321319422c4c6e56ab5e0537e79ebc/share/www/script/test/list_views.js#L42

Once I do a little more edge case testing I'll bring it into the
Apache repository as a branch. I think this is clearly better than the
current list (head / row / tail) API. What do you think?

Chris

-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message