diff src/cjr_print.sml @ 872:9654bce27cff

Validating views
author Adam Chlipala <adamc@hcoop.net>
date Tue, 30 Jun 2009 16:17:32 -0400
parents 7fa9a37a34b3
children 41971801b62d
line wrap: on
line diff
--- a/src/cjr_print.sml	Tue Jun 30 15:59:41 2009 -0400
+++ b/src/cjr_print.sml	Tue Jun 30 16:17:32 2009 -0400
@@ -2578,6 +2578,7 @@
 
         val hasDb = ref false
         val tables = ref []
+        val views = ref []
         val sequences = ref []
         val dbstring = ref ""
         val expunge = ref 0
@@ -2592,6 +2593,8 @@
                                                                                    initialize := z)
                            | DTable (s, xts, _, _) => tables := (s, map (fn (x, t) =>
                                                                             (x, sql_type_in env t)) xts) :: !tables
+                           | DView (s, xts, _) => views := (s, map (fn (x, t) =>
+                                                                       (x, sql_type_in env t)) xts) :: !views
                            | DSequence s => sequences := s :: !sequences
                            | DPreparedStatements ss => prepped := ss
                            | _ => ()) ds
@@ -2666,6 +2669,7 @@
                  #init (Settings.currentDbms ()) {dbstring = !dbstring,
                                                   prepared = !prepped,
                                                   tables = !tables,
+                                                  views = !views,
                                                   sequences = !sequences}
              else
                  box [string "void uw_db_init(uw_context ctx) { };",