Permalink
Browse files

Two-letter shortcuts for equals and not_equals

  • Loading branch information...
1 parent c6306bd commit de87d1e0a1cc30c8b32fb0b478b8f226f56dbdf9 @evanmiller evanmiller committed Mar 10, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/boss_db.erl
View
@@ -355,6 +355,10 @@ normalize_conditions([Key, Operator, Value|Rest], Acc) when is_atom(Key), is_ato
normalize_conditions(Rest, [{Key, Operator, Value}|Acc]);
normalize_conditions([{Key, Value}|Rest], Acc) when is_atom(Key) ->
normalize_conditions(Rest, [{Key, 'equals', Value}|Acc]);
+normalize_conditions([{Key, 'eq', Value}|Rest], Acc) when is_atom(Key) ->
+ normalize_conditions(Rest, [{Key, 'equals', Value}|Acc]);
+normalize_conditions([{Key, 'ne', Value}|Rest], Acc) when is_atom(Key) ->
+ normalize_conditions(Rest, [{Key, 'not_equals', Value}|Acc]);
normalize_conditions([{Key, Operator, Value}|Rest], Acc) when is_atom(Key), is_atom(Operator) ->
normalize_conditions(Rest, [{Key, Operator, Value}|Acc]).

0 comments on commit de87d1e

Please sign in to comment.