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 2013/12/23 12:49:39 UTC

[2/3] git commit: updated refs/heads/1843-feature-bigcouch to 81b75f5

@davisp trolled me by changing the default value of keys


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/4052e85d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4052e85d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4052e85d

Branch: refs/heads/1843-feature-bigcouch
Commit: 4052e85d82df980596c1a9312ab74dbdf2b9cb5b
Parents: 60ecbf0
Author: Robert Newson <rn...@apache.org>
Authored: Mon Dec 23 11:35:55 2013 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Mon Dec 23 11:49:26 2013 +0000

----------------------------------------------------------------------
 src/fabric/src/fabric_rpc.erl           | 6 +++---
 src/fabric/src/fabric_view.erl          | 2 +-
 src/fabric/src/fabric_view_all_docs.erl | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4052e85d/src/fabric/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric/src/fabric_rpc.erl b/src/fabric/src/fabric_rpc.erl
index 2685cd7..9ca4f62 100644
--- a/src/fabric/src/fabric_rpc.erl
+++ b/src/fabric/src/fabric_rpc.erl
@@ -39,7 +39,7 @@
 %% rpc endpoints
 %%  call to with_db will supply your M:F with a #db{} and then remaining args
 
-all_docs(DbName, #mrargs{keys=nil} = QueryArgs) ->
+all_docs(DbName, #mrargs{keys=undefined} = QueryArgs) ->
     {ok, Db} = get_or_create_db(DbName, []),
     #mrargs{
         start_key = StartKey,
@@ -122,7 +122,7 @@ map_view(DbName, DDoc, ViewName, QueryArgs) ->
         reduce_fun = fun couch_view:reduce_to_count/1
     },
     case Keys of
-    nil ->
+    undefined ->
         Options = couch_httpd_view:make_key_options(QueryArgs),
         {ok, _, Acc} = couch_view:fold(View, fun view_fold/3, Acc0, Options);
     _ ->
@@ -163,7 +163,7 @@ reduce_view(DbName, Group0, ViewName, QueryArgs) ->
     ReduceView = {reduce, NthRed, Lang, View},
     Acc0 = #view_acc{group_level = GroupLevel, limit = Limit+Skip},
     case Keys of
-    nil ->
+    undefined ->
         Options0 = couch_httpd_view:make_key_options(QueryArgs),
         Options = [{key_group_fun, GroupFun} | Options0],
         couch_view:fold_reduce(ReduceView, fun reduce_fold/3, Acc0, Options);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4052e85d/src/fabric/src/fabric_view.erl
----------------------------------------------------------------------
diff --git a/src/fabric/src/fabric_view.erl b/src/fabric/src/fabric_view.erl
index 9cb4b03..942231f 100644
--- a/src/fabric/src/fabric_view.erl
+++ b/src/fabric/src/fabric_view.erl
@@ -178,7 +178,7 @@ possibly_embed_doc(#collector{db_name=DbName, query_args=Args},
     end.
 
 
-keydict(nil) ->
+keydict(undefined) ->
     undefined;
 keydict(Keys) ->
     {Dict,_} = lists:foldl(fun(K, {D,I}) -> {dict:store(K,I,D), I+1} end,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4052e85d/src/fabric/src/fabric_view_all_docs.erl
----------------------------------------------------------------------
diff --git a/src/fabric/src/fabric_view_all_docs.erl b/src/fabric/src/fabric_view_all_docs.erl
index 1745fc4..1f9f460 100644
--- a/src/fabric/src/fabric_view_all_docs.erl
+++ b/src/fabric/src/fabric_view_all_docs.erl
@@ -19,7 +19,7 @@
 -include_lib("mem3/include/mem3.hrl").
 -include_lib("couch/include/couch_db.hrl").
 
-go(DbName, #view_query_args{keys=nil} = QueryArgs, Callback, Acc0) ->
+go(DbName, #view_query_args{keys=undefined} = QueryArgs, Callback, Acc0) ->
     Workers = fabric_util:submit_jobs(mem3:shards(DbName),all_docs,[QueryArgs]),
     #view_query_args{limit = Limit, skip = Skip} = QueryArgs,
     State = #collector{