summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2020-03-30 09:58:39 +0200
committergarren smith <garren.smith@gmail.com>2020-03-30 12:29:07 +0200
commit9b325b75814418b85ffb3642a5115635416f56a8 (patch)
tree8e211f0788b0f8b9eda27659708e117e17e40202
parent7ca2ca5e87d18cb3d9a3f0568e545e8219cd3d0c (diff)
downloadcouchdb-9b325b75814418b85ffb3642a5115635416f56a8.tar.gz
change _all_docs to raw collation
-rw-r--r--src/fabric/src/fabric2_util.erl8
-rw-r--r--test/elixir/test/all_docs_test.exs3
2 files changed, 4 insertions, 7 deletions
diff --git a/src/fabric/src/fabric2_util.erl b/src/fabric/src/fabric2_util.erl
index 46f9abeef..d74ef2718 100644
--- a/src/fabric/src/fabric2_util.erl
+++ b/src/fabric/src/fabric2_util.erl
@@ -294,13 +294,9 @@ uuid() ->
to_hex(crypto:strong_rand_bytes(16)).
-encode_all_doc_key(null) -> <<>>;
-encode_all_doc_key(true) -> <<>>;
-encode_all_doc_key(false) -> <<>>;
-encode_all_doc_key(N) when is_number(N) -> <<>>;
encode_all_doc_key(B) when is_binary(B) -> B;
-encode_all_doc_key(L) when is_list(L) -> <<255>>;
-encode_all_doc_key({O}) when is_list(O) -> <<255>>.
+encode_all_doc_key(Term) when Term < <<>> -> <<>>;
+encode_all_doc_key(_) -> <<255>>.
pmap(Fun, Args) ->
diff --git a/test/elixir/test/all_docs_test.exs b/test/elixir/test/all_docs_test.exs
index 9501b3bec..16641aa95 100644
--- a/test/elixir/test/all_docs_test.exs
+++ b/test/elixir/test/all_docs_test.exs
@@ -319,7 +319,8 @@ defmodule AllDocsTest do
resp = Couch.get("/#{db_name}/_all_docs", query: %{:startkey => "[1,2]"}).body
rows = resp["rows"]
- assert length(rows) === 0
+ assert length(rows) === 3
+ assert get_ids(resp) == ["a", "m", "z"]
resp = Couch.get("/#{db_name}/_all_docs", query: %{:end_key => 0}).body
rows = resp["rows"]