Browse files

Merge pull request #42 from davebcn/master

Support date type on mysql adapter
  • Loading branch information...
2 parents 230f57a + 33f8bdf commit e24727e39c981685d421511fa483a91972e7a2ff @evanmiller evanmiller committed Oct 19, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/db_adapters/boss_db_adapter_mysql.erl
View
2 src/db_adapters/boss_db_adapter_mysql.erl
@@ -429,6 +429,8 @@ pack_value(V) when is_list(V) ->
"'" ++ escape_sql(V) ++ "'";
pack_value({MegaSec, Sec, MicroSec}) when is_integer(MegaSec) andalso is_integer(Sec) andalso is_integer(MicroSec) ->
pack_now({MegaSec, Sec, MicroSec});
+pack_value({date, Date = {_,_,_}}) ->
+ pack_datetime({Date,{0,0,0}});
pack_value({{_, _, _}, {_, _, _}} = Val) ->
pack_datetime(Val);
pack_value(Val) when is_integer(Val) ->

0 comments on commit e24727e

Please sign in to comment.