Skip to content

Commit

Permalink
Two-letter shortcuts for equals and not_equals
Browse files Browse the repository at this point in the history
  • Loading branch information
evanmiller committed Mar 10, 2013
1 parent c6306bd commit de87d1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/boss_db.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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(Rest, [{Key, Operator, Value}|Acc]);
normalize_conditions([{Key, Value}|Rest], Acc) when is_atom(Key) -> normalize_conditions([{Key, Value}|Rest], Acc) when is_atom(Key) ->
normalize_conditions(Rest, [{Key, 'equals', Value}|Acc]); 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([{Key, Operator, Value}|Rest], Acc) when is_atom(Key), is_atom(Operator) ->
normalize_conditions(Rest, [{Key, Operator, Value}|Acc]). normalize_conditions(Rest, [{Key, Operator, Value}|Acc]).


Expand Down

0 comments on commit de87d1e

Please sign in to comment.