summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 15:04:37 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 15:04:37 -0400
commit51f2a80dac5c3cd25a27fb5abfdfa50d813ab0b2 (patch)
treee4e2246dc15a7cbbf067401a21197b6fd17ea95b /src/cjr_print.sml
parentcaf010bca085bea65037d194c3eb21ca8b83c23b (diff)
A view query works
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index c870c3ed..a09dd7f6 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2069,6 +2069,15 @@ fun p_decl env (dAll as (d, _) : decl) =
string x,
string " */",
newline]
+ | DView (x, _, s) => box [string "/* SQL view ",
+ string x,
+ space,
+ string "AS",
+ space,
+ string s,
+ space,
+ string " */",
+ newline]
| DDatabase {name, expunge, initialize} =>
box [string "static void uw_db_validate(uw_context);",
newline,
@@ -3089,6 +3098,17 @@ fun p_sql env (ds, _) =
string ";",
newline,
newline]
+ | DView (s, xts, q) =>
+ box [string "CREATE VIEW",
+ space,
+ string s,
+ space,
+ string "AS",
+ space,
+ string q,
+ string ";",
+ newline,
+ newline]
| _ => box []
in
(pp, E.declBinds env dAll)