Skip to content

Commit

Permalink
fix: Allow range search on '$bucket' index (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzploss-k authored Feb 26, 2021
2 parents c79c6fa + f89c973 commit 8ff80ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/krc_obj.erl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ decode(X) -> X.
-spec encode_index({_, _}) -> {binary(), binary()}.
encode_index({'$bucket',
'$bucket'}) -> {<<"$bucket">>, <<"$bucket">>};
encode_index({'$bucket', Key}) -> {<<"$bucket">>, Key};
encode_index({Idx, Key})
when is_integer(Key) -> {encode_idx(Idx,<<"int">>), Key};
encode_index({Idx, Key}) -> {encode_idx(Idx,<<"bin">>), Key}.
Expand Down

0 comments on commit 8ff80ad

Please sign in to comment.