diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-07-15 14:28:11 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-07-15 14:29:02 -0400 |
commit | fca120f299df7fd78fc1681993f4745d1bfc3ce2 (patch) | |
tree | 3b0372d735624ba9a3274f4cb2a0673746eb1951 /src | |
parent | 36bd40e5e1227817ea9a6f386b44758bc8a46359 (diff) |
update to new _changes feed format
Diffstat (limited to 'src')
-rw-r--r-- | src/fabric_rpc.erl | 8 | ||||
-rw-r--r-- | src/fabric_view_changes.erl | 8 |
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; |