You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/05/22 12:15:14 UTC
chttpd commit: updated refs/heads/master to 76d82fc
Repository: couchdb-chttpd
Updated Branches:
refs/heads/master 644ca97de -> 76d82fc3c
Support _all_docs in list functions through clustered interface
Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/76d82fc3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/76d82fc3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/76d82fc3
Branch: refs/heads/master
Commit: 76d82fc3cfa350ffb2aee8dd31628851fef640c6
Parents: 644ca97
Author: Russell Branca <ch...@apache.org>
Authored: Wed May 21 12:21:46 2014 -0700
Committer: Robert Newson <rn...@apache.org>
Committed: Thu May 22 11:09:55 2014 +0100
----------------------------------------------------------------------
src/chttpd_show.erl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/76d82fc3/src/chttpd_show.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_show.erl b/src/chttpd_show.erl
index 781d392..54a2007 100644
--- a/src/chttpd_show.erl
+++ b/src/chttpd_show.erl
@@ -187,14 +187,19 @@ handle_view_list(Req, Db, DDoc, LName, {ViewDesignName, ViewName}, Keys) ->
QueryArgs = couch_mrview_http:parse_params(Req, Keys),
chttpd:etag_respond(Req, Etag, fun() ->
couch_query_servers:with_ddoc_proc(DDoc, fun(QServer) ->
- Acc0 = #lacc{
+ Acc = #lacc{
lname = LName,
req = Req,
qserver = QServer,
db = Db,
etag = Etag
},
- fabric:query_view(Db, VDoc, ViewName, CB, Acc0, QueryArgs)
+ case ViewName of
+ <<"_all_docs">> ->
+ fabric:all_docs(Db, CB, Acc, QueryArgs);
+ _ ->
+ fabric:query_view(Db, VDoc, ViewName, CB, Acc, QueryArgs)
+ end
end)
end).