couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: use view functions to emit changes
Date Tue, 14 Dec 2010 13:28:19 GMT
On Tue, Dec 14, 2010 at 2:03 PM, Filipe David Manana
<fdmanana@apache.org> wrote:
> On Tue, Dec 14, 2010 at 12:42 PM, Benoit Chesneau <bchesneau@gmail.com> wrote:
>> Back on this, have been distracted by flu.
>
>>> 4) Perhaps here:
>>> https://github.com/benoitc/couchdb/compare/master...view_changes#L4R235
>>> the name of the command sent to the view server should be something
>>> like 'view_filter' instead of 'views', which to me is a bit misleading
>>
>> Well it would require more changes in loop.js. It actually looks for
>> mountpoints in the design doc to validate it. Her views is the mmember
>> of the ddoc where to find the map function. I think we should keep  it
>
> I don't understand. Why is it complex?
> You just need to change two lines:
>
> https://github.com/cmullaparthi/ibrowse/commit/3dabcaa174203ac41e9b5624a50e01fa02a17286#L0R63
>
> and
>
> https://github.com/benoitc/couchdb/compare/master...view_changes#L4R235
>
> "views" -> "filter_view"
> <<"views">> -> <<"filter_view">>
>
> I'm talking about just the name of the command sent to the view server.
>

For all (it was discussed on irc), this isn't as easy. Reason is :

https://github.com/benoitc/couchdb/blob/view_changes/share/server/loop.js#L91

Actually the point givent by the query server should be a member of
ddoc. So it will require either an alias :

if (funPath === "view_filter") { funPath = "views"; }

(suggested by fdmanana)

or more changes in loop.js .

I don't like to add this extra bit just for a naming purpose. This
isn't really required here even for debug since we know we are in ddoc
part of loop.js .
Ticket about this feature:https://issues.apache.org/jira/browse/COUCHDB-987


14:10 < fdmanana> nobody else complained, so i leave the decision to you

If others are OK I will commit it. Let me know.

- benoît

Mime
View raw message