Permalink
Browse files

Merge pull request #32 from LordIvan/mnesia_adaptor_ge_sort_fix

Fixed ge/le mnesia db adaptor find sort order: they were reversed.
  • Loading branch information...
2 parents 5d08791 + 8d71781 commit c1cd71d5ff17c2a53e13085f447ea78898a3020d @evanmiller evanmiller committed Sep 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/db_adapters/boss_db_adapter_mnesia.erl
@@ -126,9 +126,9 @@ test_rec(Rec,{Key, 'gt', Value}) ->
test_rec(Rec,{Key, 'lt', Value}) ->
apply(Rec,Key,[]) < Value;
test_rec(Rec,{Key, 'ge', Value}) ->
- apply(Rec,Key,[]) =< Value;
-test_rec(Rec,{Key, 'le', Value}) ->
apply(Rec,Key,[]) >= Value;
+test_rec(Rec,{Key, 'le', Value}) ->
+ apply(Rec,Key,[]) =< Value;
test_rec(Rec,{Key, 'matches', Value}) ->
{ok, MP} = re:compile(Value),
case re:run(apply(Rec,Key,[]), MP) of

0 comments on commit c1cd71d

Please sign in to comment.