Closed max-mapper closed 12 years ago
also the API I proposed is copied from filtered replication in which you specify a query_params
object in your replication JSON. because of how conflated the options are inside of follow right now (options object getting whitelisted into self
, etc) I figured this is a totally sane API given the circumstances
I pushed a modification of your patch (strangely it still gave you credit for the edit, haha). I hope you like it. It uses query_params
like you but it also sends them over HTTP if the filter runs server-side. (My own usage is to fetch the function right out of the ddoc, eval it, and choose which side to run it later.)
An example of how it feels is in the all-but useless CLI interface. https://github.com/iriscouch/follow/blob/master/cli.js#L46-50
so that you can have dynamic filters as demonstrated here: https://github.com/apache/couchdb/blob/trunk/share/www/script/test/changes.js#L232
with
ddoc/by_value
being defined as such: