diff options
author | Garren Smith <garren.smith@gmail.com> | 2020-03-30 09:58:39 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2020-03-30 09:58:39 +0200 |
commit | 573498a1d921748cb9067274748d93fff726fad7 (patch) | |
tree | b79cab7e53f527feb1b4e1503134860d193676e2 | |
parent | d67f5073f935fd971924c8093e2e4b722dfc3439 (diff) | |
download | couchdb-all_docs_raw_collation.tar.gz |
change _all_docs to raw collationarchive/all_docs_raw_collationall_docs_raw_collation
-rw-r--r-- | src/fabric/src/fabric2_util.erl | 8 | ||||
-rw-r--r-- | test/elixir/test/all_docs_test.exs | 3 |
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"] |