aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mysqlerl.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mysqlerl.erl b/src/mysqlerl.erl
index 3099675..213dbc4 100644
--- a/src/mysqlerl.erl
+++ b/src/mysqlerl.erl
@@ -209,13 +209,19 @@ convert_type("int") ->
sql_integer;
convert_type("int(" ++ Rest) ->
Size = find_data_size(Rest),
- {sql_numeric, Size};
+ {sql_numeric, list_to_integer(Size)};
+convert_type("decimal(" ++ Rest) ->
+ Size = find_data_size(Rest),
+ {sql_decimal, list_to_integer(Size)};
+convert_type("float(" ++ Rest) ->
+ Size = find_data_size(Rest),
+ {sql_float, list_to_float(Size)};
convert_type("char(" ++ Rest) ->
Size = find_data_size(Rest),
- {sql_char, Size};
+ {sql_char, list_to_integer(Size)};
convert_type("varchar(" ++ Rest) ->
Size = find_data_size(Rest),
- {sql_varchar, Size}.
+ {sql_varchar, list_to_integer(Size)}.
find_data_size(Str) ->
find_data_size(Str, []).