couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject fabric commit: updated refs/heads/master to 68b2210
Date Tue, 15 Mar 2016 19:40:45 GMT
Repository: couchdb-fabric
Updated Branches:
  refs/heads/master 0df200a3c -> 68b2210cd


Extent fetch ddoc logic for view filtered changes feeds


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

Branch: refs/heads/master
Commit: 68b2210cd460838a78db25a6cc91b53cbff710bb
Parents: 0df200a
Author: Eric Avdey <eiri@eiri.ca>
Authored: Mon Feb 29 16:07:09 2016 -0400
Committer: Eric Avdey <eiri@eiri.ca>
Committed: Tue Mar 15 16:21:34 2016 -0300

----------------------------------------------------------------------
 src/fabric_rpc.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/68b2210c/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 9b88c7f..d2578d7 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -50,11 +50,15 @@ changes(DbName, Options, StartVector, DbOptions) ->
     Args0 = lists:keyfind(changes_args, 1, Options),
     #changes_args{dir=Dir, filter_fun=Filter} = Args0,
     Args = case Filter of
-        {fetch, Style, Req, {DDocId, Rev}, FName} ->
+        {fetch, custom, Style, Req, {DDocId, Rev}, FName} ->
             {ok, DDoc} = ddoc_cache:open_doc(mem3:dbname(DbName), DDocId, Rev),
             Args0#changes_args{
                 filter_fun={custom, Style, Req, DDoc, FName}
             };
+        {fetch, FilterType, Style, {DDocId, Rev}, VName}
+                when FilterType == view orelse FilterType == fast_view ->
+            {ok, DDoc} = ddoc_cache:open_doc(mem3:dbname(DbName), DDocId, Rev),
+            Args0#changes_args{filter_fun={FilterType, Style, DDoc, VName}};
         _ ->
             Args0
     end,


Mime
View raw message