Skip to content

Commit

Permalink
Merge branch 'master' of github.com:evanmiller/boss_db
Browse files Browse the repository at this point in the history
  • Loading branch information
evanmiller committed Sep 3, 2012
2 parents 277c6d7 + cf726e6 commit ec85171
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/boss_db.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/db_adapters/boss_db_adapter_mnesia.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec85171

Please sign in to comment.