You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/05/21 21:21:55 UTC
chttpd commit: updated
refs/heads/1843-feature-bigcouch-clustered-all-docs-list-functions to b82f808
Repository: couchdb-chttpd
Updated Branches:
refs/heads/1843-feature-bigcouch-clustered-all-docs-list-functions [created] b82f80897
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/b82f8089
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/b82f8089
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/b82f8089
Branch: refs/heads/1843-feature-bigcouch-clustered-all-docs-list-functions
Commit: b82f80897657e292ecca54e1389aad7b5895b974
Parents: 2edc062
Author: Russell Branca <ch...@apache.org>
Authored: Wed May 21 12:21:46 2014 -0700
Committer: Russell Branca <ch...@apache.org>
Committed: Wed May 21 12:21:46 2014 -0700
----------------------------------------------------------------------
src/chttpd_show.erl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/b82f8089/src/chttpd_show.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_show.erl b/src/chttpd_show.erl
index b028f4c..6eae927 100644
--- a/src/chttpd_show.erl
+++ b/src/chttpd_show.erl
@@ -199,14 +199,19 @@ handle_view_list(Req, Db, DDoc, LName, {ViewDesignName, ViewName}, Keys) ->
Etag = couch_uuids:new(),
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).