diff src/cjr_print.sml @ 2056:a9159911c3ba

New phase: Dbmodecheck
author Adam Chlipala <adam@chlipala.net>
date Sun, 17 Aug 2014 13:07:56 -0400
parents 4d64af730e35
children ebfaab689570 ef766ef6e242
line wrap: on
line diff
--- a/src/cjr_print.sml	Sun Aug 10 13:40:53 2014 -0400
+++ b/src/cjr_print.sml	Sun Aug 17 13:07:56 2014 -0400
@@ -2634,7 +2634,7 @@
                 end
               | _ => NONE
 
-        val fields = foldl (fn ((ek, _, _, ts, _, _, _), fields) =>
+        val fields = foldl (fn ((ek, _, _, ts, _, _, _, _), fields) =>
                                case ek of
                                    Action eff =>
                                    (case List.nth (ts, length ts - 2) of
@@ -2956,7 +2956,7 @@
                       scripts (Settings.getScripts ())
             end
 
-        fun p_page (ek, s, n, ts, ran, side, tellSig) =
+        fun p_page (ek, s, n, ts, ran, side, dbmode, tellSig) =
             let
                 val (ts, defInputs, inputsVar, fields) =
                     case ek of
@@ -3106,6 +3106,10 @@
                      string (if couldWriteDb ek then "1" else "0"),
                      string ");",
                      newline,
+                     string "uw_set_at_most_one_query(ctx, ",
+                     string (case dbmode of OneQuery => "1" | _ => "0"),
+                     string ");",
+                     newline,
                      string "uw_set_needs_push(ctx, ",
                      string (case side of
                                  ServerAndPullAndPush => "1"