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
commit81138f15749d9fcd2b6056d4c4cd8c0edc5fce4b (patch)
treee4e2246dc15a7cbbf067401a21197b6fd17ea95b /src/cjr_print.sml
parent488033c82277ffe87f8fbd32ccd52298e0883743 (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)