summaryrefslogtreecommitdiff
path: root/src/mysql.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-10-22 16:15:56 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-10-22 16:15:56 -0400
commitdf4090ae1a231b363a0bc5d38036628e738276ee (patch)
treea765ee0cd11f8b42d77606fa4d133daceefff056 /src/mysql.sml
parentdff3c4a68a27213e3c2ebcd6223e14ae79842a7a (diff)
Initial support for char in SQL
Diffstat (limited to 'src/mysql.sml')
-rw-r--r--src/mysql.sml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mysql.sml b/src/mysql.sml
index 2941186c..d4db8710 100644
--- a/src/mysql.sml
+++ b/src/mysql.sml
@@ -36,6 +36,7 @@ fun p_sql_type t =
Int => "bigint"
| Float => "double"
| String => "longtext"
+ | Char => "char"
| Bool => "bool"
| Time => "timestamp"
| Blob => "longblob"
@@ -48,6 +49,7 @@ fun p_buffer_type t =
Int => "MYSQL_TYPE_LONGLONG"
| Float => "MYSQL_TYPE_DOUBLE"
| String => "MYSQL_TYPE_STRING"
+ | Char => "MYSQL_TYPE_TINY"
| Bool => "MYSQL_TYPE_LONG"
| Time => "MYSQL_TYPE_TIMESTAMP"
| Blob => "MYSQL_TYPE_BLOB"
@@ -60,6 +62,7 @@ fun p_sql_type_base t =
Int => "bigint"
| Float => "double"
| String => "longtext"
+ | Char => "char"
| Bool => "tinyint"
| Time => "timestamp"
| Blob => "longblob"
@@ -386,6 +389,8 @@ fun init {dbstring, prepared = ss, tables, views, sequences} =
newline,
string "uw_sqlsuffixString = \"\";",
newline,
+ string "uw_sqlsuffixChar = \"\";",
+ newline,
string "uw_sqlsuffixBlob = \"\";",
newline,
string "uw_sqlfmtUint4 = \"%u%n\";",