davisp commented on a change in pull request #1789: New Feature: Database 
Partitions
URL: https://github.com/apache/couchdb/pull/1789#discussion_r242683918
 
 

 ##########
 File path: src/mango/src/mango_opts.erl
 ##########
 @@ -296,6 +309,23 @@ validate_fields(Value) ->
     mango_fields:new(Value).
 
 
+validate_partitioned(true) ->
+    {ok, true};
+validate_partitioned(false) ->
+    {ok, false};
+validate_partitioned(default) ->
+    {ok, default};
+validate_partitioned(Else) ->
+    ?MANGO_ERROR({invalid_partitioned_value, Else}).
+
+
+validate_partition(<<>>) ->
+    {ok, <<>>};
+validate_partition(Partition) ->
+    couch_partition:validate_partition(Partition),
 
 Review comment:
   It'll get caught by the normal error handling which has clauses for it but 
we could wrap/unwrap it at the mango level for consistency if you like.

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