couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject fabric commit: updated refs/heads/COUCHDB-3287-pluggable-storage-engines to c7346a5 [Forced Update!]
Date Thu, 02 Mar 2017 14:57:49 GMT
Repository: couchdb-fabric
Updated Branches:
  refs/heads/COUCHDB-3287-pluggable-storage-engines 7fa365262 -> c7346a564 (forced update)


Revert "Don't do manual filtering of _design docs"

This reverts commit f44e627ed883f122bd9c78dc51b1578f13040423.

Namespaces don't exist with pluggable storage engines so that they are
free to implement this behavior however they want.

COUCHDB-3287


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/c7346a56
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/c7346a56
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/c7346a56

Branch: refs/heads/COUCHDB-3287-pluggable-storage-engines
Commit: c7346a564b5a359bc6add9f2db5265858f6930f2
Parents: c4ae2f5
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Mar 2 08:50:38 2017 -0600
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Thu Mar 2 08:57:27 2017 -0600

----------------------------------------------------------------------
 src/fabric.erl | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/c7346a56/src/fabric.erl
----------------------------------------------------------------------
diff --git a/src/fabric.erl b/src/fabric.erl
index c0f95df..1dfec0d 100644
--- a/src/fabric.erl
+++ b/src/fabric.erl
@@ -412,15 +412,21 @@ design_docs(DbName) ->
         undefined -> [];
         Else -> [{io_priority, Else}]
     end,
-    QueryArgs0 = #mrargs{
+    QueryArgs = #mrargs{
+        start_key = <<"_design/">>,
+        end_key = <<"_design0">>,
         include_docs=true,
         extra=Extra
     },
-    QueryArgs = set_namespace(<<"_design">>, QueryArgs0),
     Callback = fun({meta, _}, []) ->
         {ok, []};
     ({row, Props}, Acc) ->
-        {ok, [couch_util:get_value(doc, Props) | Acc]};
+        case couch_util:get_value(id, Props) of
+        <<"_design/", _/binary>> ->
+            {ok, [couch_util:get_value(doc, Props) | Acc]};
+        _ ->
+            {stop, Acc}
+        end;
     (complete, Acc) ->
         {ok, lists:reverse(Acc)};
     ({error, Reason}, _Acc) ->
@@ -584,6 +590,3 @@ kl_to_record(KeyList,RecName) ->
                     Index = lookup_index(couch_util:to_existing_atom(Key),RecName),
                     setelement(Index, Acc, Value)
                         end, Acc0, KeyList).
-
-set_namespace(NS, #mrargs{extra = Extra} = Args) ->
-    Args#mrargs{extra = [{namespace, NS} | Extra]}.


Mime
View raw message