jiangphcn commented on a change in pull request #1808: Update 
before_doc_update/2 to before_doc_update/3
URL: https://github.com/apache/couchdb/pull/1808#discussion_r244978069
 
 

 ##########
 File path: src/couch/src/couch_db_plugin.erl
 ##########
 @@ -34,11 +34,13 @@
 validate_dbname(DbName, Normalized, Default) ->
     maybe_handle(validate_dbname, [DbName, Normalized], Default).
 
-before_doc_update(Db, Doc0) ->
+before_doc_update(Db, Doc0, UpdateType) ->
     Fun = couch_db:get_before_doc_update_fun(Db),
-    case with_pipe(before_doc_update, [Doc0, Db]) of
-        [Doc1, _Db] when is_function(Fun) -> Fun(Doc1, Db);
-        [Doc1, _Db] -> Doc1
+    case with_pipe(before_doc_update, [Doc0, Db, UpdateType]) of
+        [Doc1, _Db, UpdateType] when is_function(Fun) ->
 
 Review comment:
   No problem, Ilya. I think that I got your point now. Totally make sense and 
I should use different name after calling `with_pipe/2`. The change was 
reflected in recent commit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to