couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couch-mrview commit: updated refs/heads/master to 60eb161
Date Thu, 08 May 2014 12:02:45 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master a5411c09f -> 60eb161f4


Move filtered_view_cb to saner location


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/60eb161f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/60eb161f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/60eb161f

Branch: refs/heads/master
Commit: 60eb161f487125dc1e006b01975fa9b406e203e1
Parents: a5411c0
Author: Robert Newson <rnewson@apache.org>
Authored: Thu May 8 13:02:08 2014 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu May 8 13:02:08 2014 +0100

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/60eb161f/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index a5ba68f..1965aa3 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -204,19 +204,6 @@ design_doc_view(Req, Db, DDoc, ViewName, Keys) ->
     end.
 
 
-filtered_view_cb({row, Row0}, Acc) ->
-  Row1 = lists:map(fun({doc, null}) ->
-        {doc, null};
-    ({doc, Body}) ->
-        Doc = couch_users_db:strip_non_public_fields(#doc{body=Body}),
-        {doc, Doc#doc.body};
-    (KV) ->
-        KV
-    end, Row0),
-    view_cb({row, Row1}, Acc);
-filtered_view_cb(Obj, Acc) ->
-    view_cb(Obj, Acc).
-
 multi_query_view(Req, Db, DDoc, ViewName, Queries) ->
     Args0 = parse_params(Req, undefined),
     {ok, _, _, Args1} = couch_mrview_util:get_view(Db, DDoc, ViewName, Args0),
@@ -246,6 +233,20 @@ multi_query_view(Req, Db, DDoc, ViewName, Queries) ->
     end.
 
 
+filtered_view_cb({row, Row0}, Acc) ->
+  Row1 = lists:map(fun({doc, null}) ->
+        {doc, null};
+    ({doc, Body}) ->
+        Doc = couch_users_db:strip_non_public_fields(#doc{body=Body}),
+        {doc, Doc#doc.body};
+    (KV) ->
+        KV
+    end, Row0),
+    view_cb({row, Row1}, Acc);
+filtered_view_cb(Obj, Acc) ->
+    view_cb(Obj, Acc).
+
+
 view_cb({meta, Meta}, #vacc{resp=undefined}=Acc) ->
     % Map function starting
     Headers = [{"ETag", Acc#vacc.etag}],


Mime
View raw message