summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index fcfa402e..13386f5b 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2794,11 +2794,17 @@ fun p_sql env (ds, _) =
string s,
string "(",
p_list (fn (x, t) =>
- box [string "uw_",
- string (CharVector.map Char.toLower x),
- space,
- string (#p_sql_type (Settings.currentDbms ())
- (sql_type_in env t))]) xts,
+ let
+ val t = sql_type_in env t
+ in
+ box [string "uw_",
+ string (CharVector.map Char.toLower x),
+ space,
+ string (#p_sql_type (Settings.currentDbms ()) t),
+ case t of
+ Nullable _ => box []
+ | _ => string " NOT NULL"]
+ end) xts,
case (pk, csts) of
("", []) => box []
| _ => string ",",