summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fabric_rpc.erl8
-rw-r--r--src/fabric_view_changes.erl8
2 files changed, 10 insertions, 6 deletions
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 68733de6..e1bd6831 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -322,11 +322,11 @@ send(Key, Value, #view_acc{limit=Limit} = Acc) ->
exit(timeout)
end.
-changes_enumerator(DocInfos, {Db, _Seq, Args}) ->
+changes_enumerator(DocInfo, {Db, _Seq, Args}) ->
#changes_args{include_docs=IncludeDocs, filter=FilterFun} = Args,
- [#doc_info{id=Id, high_seq=Seq, revs=[#rev_info{deleted=Del,rev=Rev}|_]}|_]
- = DocInfos,
- case [Result || Result <- FilterFun(DocInfos), Result /= null] of
+ #doc_info{id=Id, high_seq=Seq, revs=[#rev_info{deleted=Del,rev=Rev}|_]}
+ = DocInfo,
+ case [Result || Result <- FilterFun(DocInfo), Result /= null] of
[] ->
{ok, {Db, Seq, Args}};
Results ->
diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl
index 39755a01..03f362a7 100644
--- a/src/fabric_view_changes.erl
+++ b/src/fabric_view_changes.erl
@@ -164,8 +164,12 @@ handle_message({complete, EndSeq}, Worker, State) ->
end
end.
-make_changes_args(Options) ->
- Options.
+make_changes_args(#changes_args{style=main_only, filter=undefined}=Args) ->
+ Args#changes_args{filter = fun couch_changes:main_only_filter/1};
+make_changes_args(#changes_args{style=all_docs, filter=undefined}=Args) ->
+ Args#changes_args{filter = fun couch_changes:all_docs_filter/1};
+make_changes_args(Args) ->
+ Args.
get_start_seq(_DbName, #changes_args{dir=fwd, since=Since}) ->
Since;