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 2014/08/28 14:20:55 UTC

[20/50] fabric commit: updated refs/heads/master to a71701c

[2/2] Use proplist instead of #change record


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

Branch: refs/heads/master
Commit: 5e65ee0a191ad6b61be6d08ca91c36564f37381d
Parents: 16e020f
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Thu Oct 17 13:27:58 2013 -0400
Committer: Robert Newson <rn...@apache.org>
Committed: Fri Aug 1 15:33:42 2014 +0100

----------------------------------------------------------------------
 src/fabric_rpc.erl | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/5e65ee0a/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index b0ce9b1..c312aa7 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -48,7 +48,7 @@ changes(DbName, Options, StartVector, DbOptions) ->
         try
             {ok, {_, LastSeq, _, _}} =
                 couch_db:changes_since(Db, StartSeq, Enum, Opts, Acc0),
-            rexi:reply({complete, {LastSeq, uuid(Db)}})
+            rexi:reply({complete, [{seq, {LastSeq, uuid(Db)}}]})
         after
             couch_db:close(Db)
         end;
@@ -318,12 +318,26 @@ changes_enumerator(DocInfo, {Db, _Seq, Args, Options}) ->
     end.
 
 changes_row(Db, #doc_info{id=Id, high_seq=Seq}=DI, Results, Del, true, Opts) ->
-    Doc = doc_member(Db, DI, Opts),
-    #change{key={Seq, uuid(Db)}, id=Id, value=Results, doc=Doc, deleted=Del};
+    {change, [
+        {seq, {Seq, uuid(Db)}},
+        {id, Id},
+        {changes, Results},
+        {deleted, Del},
+        {doc, doc_member(Db, DI, Opts)}
+    ]};
 changes_row(Db, #doc_info{id=Id, high_seq=Seq}, Results, true, _, _) ->
-    #change{key={Seq, uuid(Db)}, id=Id, value=Results, deleted=true};
+    {change, [
+        {seq, {Seq, uuid(Db)}},
+        {id, Id},
+        {changes, Results},
+        {deleted, true}
+    ]};
 changes_row(Db, #doc_info{id=Id, high_seq=Seq}, Results, _, _, _) ->
-    #change{key={Seq, uuid(Db)}, id=Id, value=Results}.
+    {change, [
+        {seq, {Seq, uuid(Db)}},
+        {id, Id},
+        {changes, Results}
+    ]}.
 
 doc_member(Shard, DocInfo, Opts) ->
     case couch_db:open_doc(Shard, DocInfo, [deleted | Opts]) of