couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonysu...@apache.org
Subject [1/3] couchdb-mango git commit: Change limit default
Date Mon, 20 Apr 2015 17:12:12 GMT
Repository: couchdb-mango
Updated Branches:
  refs/heads/2652-index-pagination 90652ce11 -> 0deb8d131


Change limit default

Change limit default to extremely large number to represent
an unbound limit.

FogBugzID: 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/f6f517b7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/f6f517b7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/f6f517b7

Branch: refs/heads/2652-index-pagination
Commit: f6f517b7567709dfdeed46c2a3e4fc82bad0104c
Parents: 90652ce
Author: Tony Sun <tony.sun@cloudant.com>
Authored: Mon Apr 20 09:48:09 2015 -0700
Committer: Tony Sun <tony.sun@cloudant.com>
Committed: Mon Apr 20 09:48:09 2015 -0700

----------------------------------------------------------------------
 src/mango_httpd.erl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/f6f517b7/src/mango_httpd.erl
----------------------------------------------------------------------
diff --git a/src/mango_httpd.erl b/src/mango_httpd.erl
index 4980f10..2ccc7f3 100644
--- a/src/mango_httpd.erl
+++ b/src/mango_httpd.erl
@@ -54,8 +54,7 @@ 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),
-    % Set limit default to 200 here since dashboard defaults to 200 per page.
-    Limit = case couch_util:get_value(limit, Params, 200) of
+    Limit = case couch_util:get_value(limit, Params, 10000000000) of
         Limit0 when Limit0 < 1 ->
             ?MANGO_ERROR(invalid_list_index_params);
         Limit0 ->


Mime
View raw message