You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by to...@apache.org on 2020/06/12 18:13:39 UTC

[couchdb] branch add-r-w-back created (now 751a940)

This is an automated email from the ASF dual-hosted git repository.

tonysun83 pushed a change to branch add-r-w-back
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 751a940  add back r and w options

This branch includes the following new commits:

     new 751a940  add back r and w options

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: add back r and w options

Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tonysun83 pushed a commit to branch add-r-w-back
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 751a940f66822112cf93a7c47986d8a417d0c85f
Author: Tony Sun <to...@gmail.com>
AuthorDate: Fri Jun 12 11:02:48 2020 -0700

    add back r and w options
---
 src/mango/src/mango_opts.erl | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/mango/src/mango_opts.erl b/src/mango/src/mango_opts.erl
index e357676..7bae9c9 100644
--- a/src/mango/src/mango_opts.erl
+++ b/src/mango/src/mango_opts.erl
@@ -64,6 +64,12 @@ validate_idx_create({Props}) ->
             {optional, true},
             {default, auto_name},
             {validator, fun validate_idx_name/1}
+        ]},
+        {<<"w">>, [
+            {tag, w},
+            {optional, true},
+            {default, 2},
+            {validator, fun is_pos_integer/1}
         ]}
     ],
     validate(Props, Opts).
@@ -111,6 +117,12 @@ validate_find({Props}) ->
             {default, []},
             {validator, fun validate_fields/1}
         ]},
+        {<<"r">>, [
+            {tag, r},
+            {optional, true},
+            {default, 1},
+            {validator, fun mango_opts:is_pos_integer/1}
+        ]},
         {<<"conflicts">>, [
             {tag, conflicts},
             {optional, true},