Permalink
Browse files

Fix case-insensitive matching (MongoDB)

  • Loading branch information...
1 parent ad171d9 commit 4486bd9e1794e7386333a9ff818cbf1d0740c928 @evanmiller evanmiller committed Mar 26, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/db_adapters/boss_db_adapter_mongodb.erl
@@ -200,12 +200,12 @@ build_conditions1([{Key, Operator, Value}|Rest], Acc) ->
% ?LOG("Key, Operator, Value", {Key, Operator, Value}),
Condition = case {Operator, Value} of
- {'not_matches', "*"++Value} ->
- [{Key, {'$not', {regex, list_to_binary(Value), <<"i">>}}}];
+ {'not_matches', "*"++Value1} ->
+ [{Key, {'$not', {regex, list_to_binary(Value1), <<"i">>}}}];
{'not_matches', Value} ->
[{Key, {'$not', {regex, list_to_binary(Value), <<"">>}}}];
- {'matches', "*"++Value} ->
- [{Key, {regex, list_to_binary(Value), <<"i">>}}];
+ {'matches', "*"++Value1} ->
+ [{Key, {regex, list_to_binary(Value1), <<"i">>}}];
{'matches', Value} ->
[{Key, {regex, list_to_binary(Value), <<"">>}}];
{'contains', Value} ->

0 comments on commit 4486bd9

Please sign in to comment.