Browse files

Fixed ge/le mnesia db adaptor find sort order: they were reversed.

  • Loading branch information...
1 parent 5d08791 commit 8d71781ef6d0803c8157c9e057deda5281ea58a9 @franko-franicevich franko-franicevich committed Sep 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/db_adapters/boss_db_adapter_mnesia.erl
View
4 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 8d71781

Please sign in to comment.