diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-06-15 13:34:34 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 11:18:45 -0400 |
commit | 49e2051daeb274d7c919e64946d2e6c50e083a93 (patch) | |
tree | 5fc7674ab0497c6adb982797ec3bf38fb66e6f1d /src | |
parent | daf255771e50f720bad558a2218decd0d1a26bb1 (diff) |
use proper startkey and endkey for 0.11
Diffstat (limited to 'src')
-rw-r--r-- | src/chttpd_view.erl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/chttpd_view.erl b/src/chttpd_view.erl index a4d909a1..6984f3e6 100644 --- a/src/chttpd_view.erl +++ b/src/chttpd_view.erl @@ -255,8 +255,8 @@ output_reduce_view(Req, Db, View, Group, QueryArgs, Keys) -> finish_reduce_fold(Req, Resp) end). -reverse_key_default(nil) -> {}; -reverse_key_default({}) -> nil; +reverse_key_default(?MIN_STR) -> ?MAX_STR; +reverse_key_default(?MAX_STR) -> ?MIN_STR; reverse_key_default(Key) -> Key. get_stale_type(Req) -> @@ -384,12 +384,8 @@ validate_view_query(descending, true, Args) -> fwd -> Args#view_query_args{ direction = rev, - start_key = - reverse_key_default(Args#view_query_args.start_key), start_docid = reverse_key_default(Args#view_query_args.start_docid), - end_key = - reverse_key_default(Args#view_query_args.end_key), end_docid = reverse_key_default(Args#view_query_args.end_docid) } |