jiangphcn commented on a change in pull request #1017: Allow replicator 
documents to include params for db creation
URL: https://github.com/apache/couchdb/pull/1017#discussion_r153379474
 
 

 ##########
 File path: src/couch_replicator/src/couch_replicator_api_wrap.erl
 ##########
 @@ -68,20 +68,24 @@ db_uri(Db) ->
 
 
 db_open(Db, Options) ->
-    db_open(Db, Options, false).
+    db_open(Db, Options, false, []).
 
-db_open(#httpdb{} = Db1, _Options, Create) ->
+db_open(#httpdb{} = Db1, _Options, Create, CreateParams) ->
     {ok, Db} = couch_replicator_httpc:setup(Db1),
     try
         case Create of
         false ->
             ok;
         true ->
-            send_req(Db, [{method, put}],
+            Db2 = case couch_util:get_value(<<"q">>, CreateParams) of
 
 Review comment:
   Yes, I extend this to be generic.

----------------------------------------------------------------
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