Permalink
Browse files

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

  • Loading branch information...
2 parents f07bb17 + 69889d8 commit 3acc4810cb017aa440e558193dc2a6bf3293e940 @evanmiller evanmiller committed Feb 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/db_adapters/boss_db_adapter_mysql.erl
@@ -326,11 +326,11 @@ build_conditions(Type, Conditions) ->
build_conditions1([], Acc) ->
Acc;
-build_conditions1([{Key, 'equals', Value}|Rest], Acc) when Value == undefined ->
+build_conditions1([{Key, 'equals', Value}|Rest], Acc) when Value == undefined ; Value == null->
build_conditions1(Rest, add_cond(Acc, Key, "is", pack_value(Value)));
build_conditions1([{Key, 'equals', Value}|Rest], Acc) ->
build_conditions1(Rest, add_cond(Acc, Key, "=", pack_value(Value)));
-build_conditions1([{Key, 'not_equals', Value}|Rest], Acc) when Value == undefined ->
+build_conditions1([{Key, 'not_equals', Value}|Rest], Acc) when Value == undefined ; Value == null ->
build_conditions1(Rest, add_cond(Acc, Key, "is not", pack_value(Value)));
build_conditions1([{Key, 'not_equals', Value}|Rest], Acc) ->
build_conditions1(Rest, add_cond(Acc, Key, "!=", pack_value(Value)));

0 comments on commit 3acc481

Please sign in to comment.