You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2018/08/30 09:44:58 UTC

[couchdb] branch user-partitioned-dbs-6 updated (c1559fe -> 3aad6b6)

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

rnewson pushed a change to branch user-partitioned-dbs-6
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard c1559fe  add POST support for keys for views
     new 3aad6b6  add POST support for keys for views

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c1559fe)
            \
             N -- N -- N   refs/heads/user-partitioned-dbs-6 (3aad6b6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 src/chttpd/src/chttpd_view.erl | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)


[couchdb] 01/01: add POST support for keys for views

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

rnewson pushed a commit to branch user-partitioned-dbs-6
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 3aad6b66108e568c8b58b2328b55c707a0524611
Author: Garren Smith <ga...@gmail.com>
AuthorDate: Thu Aug 30 11:34:20 2018 +0200

    add POST support for keys for views
---
 src/chttpd/src/chttpd_view.erl | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/chttpd/src/chttpd_view.erl b/src/chttpd/src/chttpd_view.erl
index 627663c..0735590 100644
--- a/src/chttpd/src/chttpd_view.erl
+++ b/src/chttpd/src/chttpd_view.erl
@@ -106,6 +106,24 @@ handle_temp_view_req(Req, _Db) ->
     chttpd:send_error(Req, 410, gone, Msg).
 
 
+handle_partition_view_req(#httpd{method='POST',
+        path_parts=[_, _, _, _, _, _, ViewName]} = Req, Db, DDoc, Partition) ->
+    chttpd:validate_ctype(Req, "application/json"),
+    Props = couch_httpd:json_body_obj(Req),
+    Keys = couch_mrview_util:get_view_keys(Props),
+    case Keys of
+        Keys when is_list(Keys) ->
+            couch_stats:increment_counter([couchdb, httpd, view_reads]),
+            Args0 = couch_mrview_http:parse_params(Req, Keys),
+            Args1 = couch_mrview_util:set_extra(Args0, partition, Partition),
+            design_doc_view_int(Req, Db, DDoc, ViewName, Args1);
+        _ ->
+            throw({
+                bad_request,
+                "POST body must contain `keys` field"
+            })
+    end;
+
 handle_partition_view_req(#httpd{method='GET',
         path_parts=[_, _, _, _, _, _, ViewName]} = Req, Db, DDoc, Partition) ->
     Keys = chttpd:qs_json_value(Req, "keys", undefined),