You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2017/11/27 16:27:32 UTC
[GitHub] nickva commented on a change in pull request #1017: Allow replicator documents to include params for db creation
nickva 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_r153247525
##########
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:
We explicitly handle `q` parameter here, I wonder if it is worth making it more generic. What if users want to specify `n`, `placement` or even the new PSE `engine` parameters? I think it should be possible. Or do you think it's better to restrict it to specific params only?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services