couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject [01/43] couch-mrview commit: updated refs/heads/2971-count-distinct to f7c3c24
Date Wed, 01 Mar 2017 16:37:35 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/2971-count-distinct 6ec35971e -> f7c3c24db


Render update_seq if number or binary

COUCHDB-2849


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/65b7a3a6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/65b7a3a6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/65b7a3a6

Branch: refs/heads/2971-count-distinct
Commit: 65b7a3a64ae087901d2d2fbe785233b04f135b4b
Parents: 6ec3597
Author: Robert Newson <rnewson@apache.org>
Authored: Sun Apr 17 19:21:20 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Sun Apr 17 19:21:20 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/65b7a3a6/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index 9eb306b..1f08961 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -349,7 +349,10 @@ view_cb({meta, Meta}, #vacc{}=Acc) ->
         Offset -> [io_lib:format("\"offset\":~p", [Offset])]
     end ++ case couch_util:get_value(update_seq, Meta) of
         undefined -> [];
-        UpdateSeq -> [io_lib:format("\"update_seq\":~p", [UpdateSeq])]
+        UpdateSeq when is_integer(UpdateSeq) ->
+            [io_lib:format("\"update_seq\":~B", [UpdateSeq])];
+        UpdateSeq when is_binary(UpdateSeq) ->
+            [io_lib:format("\"update_seq\":\"~s\"", [UpdateSeq])]
     end ++ ["\"rows\":["],
     Chunk = [prepend_val(Acc), "{", string:join(Parts, ","), "\r\n"],
     {ok, AccOut} = maybe_flush_response(Acc, Chunk, iolist_size(Chunk)),


Mime
View raw message