You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by to...@apache.org on 2015/04/20 19:45:48 UTC
couchdb-mango git commit: Change hardcode for TotalRows
Repository: couchdb-mango
Updated Branches:
refs/heads/2652-index-pagination 0deb8d131 -> 137ad3abe
Change hardcode for TotalRows
Fixes:COUCHDB-2652
Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/137ad3ab
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/137ad3ab
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/137ad3ab
Branch: refs/heads/2652-index-pagination
Commit: 137ad3abe913c9805bbdc51685550464267d6476
Parents: 0deb8d1
Author: Tony Sun <to...@cloudant.com>
Authored: Mon Apr 20 10:48:10 2015 -0700
Committer: Tony Sun <to...@cloudant.com>
Committed: Mon Apr 20 10:48:10 2015 -0700
----------------------------------------------------------------------
src/mango_httpd.erl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/137ad3ab/src/mango_httpd.erl
----------------------------------------------------------------------
diff --git a/src/mango_httpd.erl b/src/mango_httpd.erl
index 69e0296..d3fde9c 100644
--- a/src/mango_httpd.erl
+++ b/src/mango_httpd.erl
@@ -54,8 +54,8 @@ handle_index_req(#httpd{method='GET', path_parts=[_, _]}=Req, Db) ->
chttpd:qs(Req)),
Idxs = lists:sort(mango_idx:list(Db)),
JsonIdxs0 = lists:map(fun mango_idx:to_json/1, Idxs),
- TotalRows = length(JsonIdxs0) ,
- Limit = case couch_util:get_value(limit, Params, 10000000000) of
+ TotalRows = length(JsonIdxs0),
+ Limit = case couch_util:get_value(limit, Params, TotalRows) of
Limit0 when Limit0 < 1 ->
?MANGO_ERROR(invalid_list_index_params);
Limit0 ->