summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_view_group.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-09-30 12:03:15 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-09-30 12:03:15 +0000
commit6ae13b5f8b827bc87a8cf3306c3caa1b97e49df3 (patch)
tree9662164348a314705094f5f52456ab7bfe330df9 /src/couchdb/couch_view_group.erl
parent1c0a6e9c637fcfec2990c6318b3c69e4c7591d76 (diff)
Removing ?getv macros.
With OTP releases up to R13B03 it's not possible to define a 2 macro functions with the same name and different arities. (Only allowed in R13B04 and R14). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1003025 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_view_group.erl')
-rw-r--r--src/couchdb/couch_view_group.erl16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/couchdb/couch_view_group.erl b/src/couchdb/couch_view_group.erl
index 86e41b89..2f59f8e3 100644
--- a/src/couchdb/couch_view_group.erl
+++ b/src/couchdb/couch_view_group.erl
@@ -519,19 +519,19 @@ get_group_info(State) ->
% maybe move to another module
design_doc_to_view_group(#doc{id=Id,body={Fields}}) ->
- Language = ?getv(<<"language">>, Fields, <<"javascript">>),
- {DesignOptions} = ?getv(<<"options">>, Fields, {[]}),
- {RawViews} = ?getv(<<"views">>, Fields, {[]}),
- Lib = ?getv(<<"lib">>, RawViews, {[]}),
+ Language = couch_util:get_value(<<"language">>, Fields, <<"javascript">>),
+ {DesignOptions} = couch_util:get_value(<<"options">>, Fields, {[]}),
+ {RawViews} = couch_util:get_value(<<"views">>, Fields, {[]}),
+ Lib = couch_util:get_value(<<"lib">>, RawViews, {[]}),
% add the views to a dictionary object, with the map source as the key
DictBySrc =
lists:foldl(
fun({Name, {MRFuns}}, DictBySrcAcc) ->
- case ?getv(<<"map">>, MRFuns) of
+ case couch_util:get_value(<<"map">>, MRFuns) of
undefined -> DictBySrcAcc;
MapSrc ->
- RedSrc = ?getv(<<"reduce">>, MRFuns, null),
- {ViewOptions} = ?getv(<<"options">>, MRFuns, {[]}),
+ RedSrc = couch_util:get_value(<<"reduce">>, MRFuns, null),
+ {ViewOptions} = couch_util:get_value(<<"options">>, MRFuns, {[]}),
View =
case dict:find({MapSrc, ViewOptions}, DictBySrcAcc) of
{ok, View0} -> View0;
@@ -594,7 +594,7 @@ init_group(Db, Fd, #group{def_lang=Lang,views=Views}=
{Count, Reduced}
end,
- case ?getv(<<"collation">>, Options, <<"default">>) of
+ case couch_util:get_value(<<"collation">>, Options, <<"default">>) of
<<"default">> ->
Less = fun couch_view:less_json_ids/2;
<<"raw">> ->