garrensmith commented on a change in pull request #881: Fix maximum key value
when using JSON indexes
URL: https://github.com/apache/couchdb/pull/881#discussion_r144822894
##########
File path: src/mango/src/mango_cursor_view.erl
##########
@@ -61,18 +61,34 @@ explain(Cursor) ->
BaseArgs = base_args(Cursor),
Args = apply_opts(Opts, BaseArgs),
+
[{mrargs, {[
{include_docs, Args#mrargs.include_docs},
{view_type, Args#mrargs.view_type},
{reduce, Args#mrargs.reduce},
{start_key, Args#mrargs.start_key},
- {end_key, Args#mrargs.end_key},
+ {end_key, replace_max_json(Args#mrargs.end_key)},
{direction, Args#mrargs.direction},
{stable, Args#mrargs.stable},
{update, Args#mrargs.update}
]}}].
+replace_max_json([]) ->
Review comment:
Should we maybe call this `maybe_replace_max_json`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services