Fix dumb error

This commit is contained in:
Alexey Romanov
2011-03-21 12:20:09 +03:00
parent 1688f763f0
commit fd7d937948

View File

@@ -72,7 +72,7 @@ value_to_sql_unsafe(X) ->
case X of
_ when is_integer(X) -> integer_to_list(X);
_ when is_float(X) -> float_to_list(X);
undefined -> "NULL"
undefined -> "NULL";
?NULL_ATOM -> "NULL";
{blob, Blob} -> ["x'", bin_to_hex(Blob), $'];
_ -> [$', unicode:characters_to_binary(X), $'] %% assumes no $' inside strings!
@@ -93,7 +93,7 @@ value_to_sql(X) ->
case X of
_ when is_integer(X) -> integer_to_list(X);
_ when is_float(X) -> float_to_list(X);
undefined -> "NULL"
undefined -> "NULL";
?NULL_ATOM -> "NULL";
{blob, Blob} -> ["x'", bin_to_hex(Blob), $'];
_ -> [$', unicode:characters_to_binary(escape(X)), $']