summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_db.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-09-27 19:14:37 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-09-27 19:14:37 +0000
commit6c6db011c2064597526c6f36878a282238dd2bf2 (patch)
tree9875a3237a385b3ff9d9f53be7642bafbabcbbfa /src/couchdb/couch_httpd_db.erl
parentc4e2e1416bcedbe654d56c3851a0d08cddfc4bee (diff)
Replacing calls to couch_util:get_value with ?getv
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1001879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r--src/couchdb/couch_httpd_db.erl16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index 93e93892..877ee99d 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -277,7 +277,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) ->
couch_stats_collector:increment({httpd, bulk_requests}),
couch_httpd:validate_ctype(Req, "application/json"),
{JsonProps} = couch_httpd:json_body_obj(Req),
- DocsArray = couch_util:get_value(<<"docs">>, JsonProps),
+ DocsArray = ?getv(<<"docs">>, JsonProps),
case couch_httpd:header_value(Req, "X-Couch-Full-Commit") of
"true" ->
Options = [full_commit];
@@ -286,7 +286,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) ->
_ ->
Options = []
end,
- case couch_util:get_value(<<"new_edits">>, JsonProps, true) of
+ case ?getv(<<"new_edits">>, JsonProps, true) of
true ->
Docs = lists:map(
fun({ObjProps} = JsonObj) ->
@@ -296,7 +296,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) ->
<<>> -> couch_uuids:new();
Id0 -> Id0
end,
- case couch_util:get_value(<<"_rev">>, ObjProps) of
+ case ?getv(<<"_rev">>, ObjProps) of
undefined ->
Revs = {0, []};
Rev ->
@@ -307,7 +307,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) ->
end,
DocsArray),
Options2 =
- case couch_util:get_value(<<"all_or_nothing">>, JsonProps) of
+ case ?getv(<<"all_or_nothing">>, JsonProps) of
true -> [all_or_nothing|Options];
_ -> Options
end,
@@ -357,7 +357,7 @@ db_req(#httpd{method='GET',path_parts=[_,<<"_all_docs">>]}=Req, Db) ->
db_req(#httpd{method='POST',path_parts=[_,<<"_all_docs">>]}=Req, Db) ->
{Fields} = couch_httpd:json_body_obj(Req),
- case couch_util:get_value(<<"keys">>, Fields, nil) of
+ case ?getv(<<"keys">>, Fields, nil) of
nil ->
?LOG_DEBUG("POST to _all_docs with no keys member.", []),
all_docs_view(Req, Db, nil);
@@ -478,7 +478,7 @@ all_docs_view(Req, Db, Keys) ->
CurrentEtag = couch_httpd:make_etag(Info),
couch_httpd:etag_respond(Req, CurrentEtag, fun() ->
- TotalRowCount = couch_util:get_value(doc_count, Info),
+ TotalRowCount = ?getv(doc_count, Info),
StartId = if is_binary(StartKey) -> StartKey;
true -> StartDocId
end,
@@ -612,9 +612,9 @@ db_doc_req(#httpd{method='POST'}=Req, Db, DocId) ->
couch_doc:validate_docid(DocId),
couch_httpd:validate_ctype(Req, "multipart/form-data"),
Form = couch_httpd:parse_form(Req),
- case couch_util:get_value("_doc", Form) of
+ case ?getv("_doc", Form) of
undefined ->
- Rev = couch_doc:parse_rev(couch_util:get_value("_rev", Form)),
+ Rev = couch_doc:parse_rev(?getv("_rev", Form)),
{ok, [{ok, Doc}]} = couch_db:open_doc_revs(Db, DocId, [Rev], []);
Json ->
Doc = couch_doc_from_req(Req, DocId, ?JSON_DECODE(Json))