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 2016/04/17 20:43:36 UTC
couch-mrview commit: updated refs/heads/master to 65b7a3a
Repository: couchdb-couch-mrview
Updated Branches:
refs/heads/master 6ec35971e -> 65b7a3a64
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/master
Commit: 65b7a3a64ae087901d2d2fbe785233b04f135b4b
Parents: 6ec3597
Author: Robert Newson <rn...@apache.org>
Authored: Sun Apr 17 19:21:20 2016 +0100
Committer: Robert Newson <rn...@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)),