Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:evanmiller/boss_db

  • Loading branch information...
commit ec851719f0f23b565cee28c54afd8ce20ee5cf7f 2 parents 277c6d7 + cf726e6
@evanmiller evanmiller authored
Showing with 4 additions and 2 deletions.
  1. +2 −0  src/boss_db.erl
  2. +2 −2 src/db_adapters/boss_db_adapter_mnesia.erl
View
2  src/boss_db.erl
@@ -285,6 +285,8 @@ validate_record_types(Record) ->
true;
{{N1, N2, N3}, timestamp} when is_integer(N1), is_integer(N2), is_integer(N3) ->
true;
+ {Data, atom} when is_atom(Data) ->
+ true;
{_Data, Type} ->
false
end,
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 ec85171

Please sign in to comment.
Something went wrong with that request. Please try again.