couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [1/9] chttpd commit: updated refs/heads/1843-feature-bigcouch-clustered-eventsource-changes-feed to 002a908
Date Wed, 28 May 2014 22:45:07 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/1843-feature-bigcouch-clustered-eventsource-changes-feed be1643b43 -> 002a90813
(forced update)


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/1843-feature-bigcouch-clustered-eventsource-changes-feed
Commit: 76d82fc3cfa350ffb2aee8dd31628851fef640c6
Parents: 644ca97
Author: Russell Branca <chewbranca@apache.org>
Authored: Wed May 21 12:21:46 2014 -0700
Committer: Robert Newson <rnewson@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).
 


Mime
View raw message