diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-12-22 18:03:44 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-12-22 18:03:44 +0000 |
commit | ea3b1153e52ac1513da4d634eedefb05c261039c (patch) | |
tree | 858c5b3d81509bfe784b8d2d1252921cbf34aa54 /src/couchdb/couch_doc.erl | |
parent | 22c551bb103072826c0299265670d1483c753dde (diff) |
move query server to a design-doc based protocol, closes COUCHDB-589
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@893249 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_doc.erl')
-rw-r--r-- | src/couchdb/couch_doc.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl index bdefb95c..ba5c7450 100644 --- a/src/couchdb/couch_doc.erl +++ b/src/couchdb/couch_doc.erl @@ -292,15 +292,13 @@ att_to_iolist(#att{data=DataFun, len=Len}) when is_function(DataFun)-> lists:reverse(fold_streamed_data(DataFun, Len, fun(Data, Acc) -> [Data | Acc] end, [])). -get_validate_doc_fun(#doc{body={Props}}) -> - Lang = proplists:get_value(<<"language">>, Props, <<"javascript">>), +get_validate_doc_fun(#doc{body={Props}}=DDoc) -> case proplists:get_value(<<"validate_doc_update">>, Props) of undefined -> nil; - FunSrc -> + _Else -> fun(EditDoc, DiskDoc, Ctx) -> - couch_query_servers:validate_doc_update( - Lang, FunSrc, EditDoc, DiskDoc, Ctx) + couch_query_servers:validate_doc_update(DDoc, EditDoc, DiskDoc, Ctx) end end. |