From 1b40244642f1099df7b7addecf2ac47e52b8d636 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 18 Aug 2010 14:09:22 -0400 Subject: design_doc_to_view_group only needs the #doc{} --- apps/chttpd/src/chttpd_show.erl | 2 +- apps/chttpd/src/chttpd_view.erl | 2 +- apps/fabric/src/fabric_group_info.erl | 2 +- apps/fabric/src/fabric_rpc.erl | 2 +- apps/fabric/src/fabric_view_reduce.erl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/chttpd/src/chttpd_show.erl b/apps/chttpd/src/chttpd_show.erl index fba7f040..0aba2835 100644 --- a/apps/chttpd/src/chttpd_show.erl +++ b/apps/chttpd/src/chttpd_show.erl @@ -183,7 +183,7 @@ handle_view_list_req(Req, _Db, _DDoc) -> handle_view_list(Req, Db, DDoc, LName, {ViewDesignName, ViewName}, Keys) -> {ok, VDoc} = fabric:open_doc(Db, <<"_design/", ViewDesignName/binary>>, []), - Group = couch_view_group:design_doc_to_view_group(Db, VDoc), + Group = couch_view_group:design_doc_to_view_group(VDoc), IsReduce = chttpd_view:get_reduce_type(Req), ViewType = chttpd_view:extract_view_type(ViewName, Group#group.views, IsReduce), diff --git a/apps/chttpd/src/chttpd_view.erl b/apps/chttpd/src/chttpd_view.erl index 87a03307..87138702 100644 --- a/apps/chttpd/src/chttpd_view.erl +++ b/apps/chttpd/src/chttpd_view.erl @@ -23,7 +23,7 @@ send_chunked_error/2]). design_doc_view(Req, Db, DDoc, ViewName, Keys) -> - Group = couch_view_group:design_doc_to_view_group(Db, DDoc), + Group = couch_view_group:design_doc_to_view_group(DDoc), IsReduce = get_reduce_type(Req), ViewType = extract_view_type(ViewName, Group#group.views, IsReduce), QueryArgs = parse_view_params(Req, Keys, ViewType), diff --git a/apps/fabric/src/fabric_group_info.erl b/apps/fabric/src/fabric_group_info.erl index 04605a66..7dfb4888 100644 --- a/apps/fabric/src/fabric_group_info.erl +++ b/apps/fabric/src/fabric_group_info.erl @@ -11,7 +11,7 @@ go(DbName, GroupId) when is_binary(GroupId) -> go(DbName, DDoc); go(DbName, #doc{} = DDoc) -> - Group = couch_view_group:design_doc_to_view_group(#db{name=DbName}, DDoc), + Group = couch_view_group:design_doc_to_view_group(DDoc), Shards = mem3:shards(DbName), Workers = fabric_util:submit_jobs(Shards, group_info, [Group]), Acc0 = {fabric_dict:init(Workers, nil), []}, diff --git a/apps/fabric/src/fabric_rpc.erl b/apps/fabric/src/fabric_rpc.erl index f56e3f68..24c04ea8 100644 --- a/apps/fabric/src/fabric_rpc.erl +++ b/apps/fabric/src/fabric_rpc.erl @@ -80,7 +80,7 @@ map_view(DbName, DDoc, ViewName, QueryArgs) -> view_type = ViewType } = QueryArgs, MinSeq = if Stale == ok -> 0; true -> couch_db:get_update_seq(Db) end, - Group0 = couch_view_group:design_doc_to_view_group(Db, DDoc), + Group0 = couch_view_group:design_doc_to_view_group(DDoc), {ok, Pid} = gen_server:call(couch_view, {get_group_server, DbName, Group0}), {ok, Group} = couch_view_group:request_group(Pid, MinSeq), View = fabric_view:extract_view(Pid, ViewName, Group#group.views, ViewType), diff --git a/apps/fabric/src/fabric_view_reduce.erl b/apps/fabric/src/fabric_view_reduce.erl index ddde9f22..4b2d4c80 100644 --- a/apps/fabric/src/fabric_view_reduce.erl +++ b/apps/fabric/src/fabric_view_reduce.erl @@ -12,7 +12,7 @@ go(DbName, GroupId, View, Args, Callback, Acc0) when is_binary(GroupId) -> go(DbName, DDoc, VName, Args, Callback, Acc0) -> #group{def_lang=Lang, views=Views} = Group = - couch_view_group:design_doc_to_view_group(#db{name=DbName}, DDoc), + couch_view_group:design_doc_to_view_group(DDoc), {NthRed, View} = fabric_view:extract_view(nil, VName, Views, reduce), {VName, RedSrc} = lists:nth(NthRed, View#view.reduce_funs), Workers = lists:map(fun(#shard{name=Name, node=N} = Shard) -> -- cgit v1.2.3