You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2014/10/16 11:36:39 UTC

[2/2] couch commit: updated refs/heads/master to 40c5c85

Remove couch_query_servers:map_docs/2

It's not being used since couch_mrview introduction which provides own
couch_mrview_updater:map_docs/2 and actually uses it instead.


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

Branch: refs/heads/master
Commit: 40c5c85d3bf60c73f28389394058ec1f27207335
Parents: c6c3c1e
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Oct 13 23:54:44 2014 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Oct 13 23:54:44 2014 +0400

----------------------------------------------------------------------
 src/couch_query_servers.erl | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/40c5c85d/src/couch_query_servers.erl
----------------------------------------------------------------------
diff --git a/src/couch_query_servers.erl b/src/couch_query_servers.erl
index 13b0b91..d38f040 100644
--- a/src/couch_query_servers.erl
+++ b/src/couch_query_servers.erl
@@ -13,7 +13,7 @@
 -module(couch_query_servers).
 
 -export([try_compile/4]).
--export([start_doc_map/3, map_docs/2, map_doc_raw/2, stop_doc_map/1, raw_to_ejson/1]).
+-export([start_doc_map/3, map_doc_raw/2, stop_doc_map/1, raw_to_ejson/1]).
 -export([reduce/3, rereduce/3,validate_doc_update/5]).
 -export([filter_docs/5]).
 -export([filter_view/3]).
@@ -56,29 +56,6 @@ start_doc_map(Lang, Functions, Lib) ->
     end, Functions),
     {ok, Proc}.
 
-map_docs(Proc, Docs) ->
-    % send the documents
-    Results = lists:map(
-        fun(Doc) ->
-            Json = couch_doc:to_json_obj(Doc, []),
-
-            FunsResults = proc_prompt(Proc, [<<"map_doc">>, Json]),
-            % the results are a json array of function map yields like this:
-            % [FunResults1, FunResults2 ...]
-            % where funresults is are json arrays of key value pairs:
-            % [[Key1, Value1], [Key2, Value2]]
-            % Convert the key, value pairs to tuples like
-            % [{Key1, Value1}, {Key2, Value2}]
-            lists:map(
-                fun(FunRs) ->
-                    [list_to_tuple(FunResult) || FunResult <- FunRs]
-                end,
-            FunsResults)
-        end,
-        Docs),
-    couch_stats:increment_counter([couchdb, couchjs, map_doc], length(Docs)),
-    {ok, Results}.
-
 map_doc_raw(Proc, Doc) ->
     Json = couch_doc:to_json_obj(Doc, []),
     {ok, proc_prompt_raw(Proc, [<<"map_doc">>, Json])}.