aboutsummaryrefslogtreecommitdiffhomepage
path: root/caching-tests/test.ur
diff options
context:
space:
mode:
Diffstat (limited to 'caching-tests/test.ur')
-rw-r--r--caching-tests/test.ur66
1 files changed, 33 insertions, 33 deletions
diff --git a/caching-tests/test.ur b/caching-tests/test.ur
index 931612bc..2722bcdc 100644
--- a/caching-tests/test.ur
+++ b/caching-tests/test.ur
@@ -11,26 +11,26 @@ fun cache01 () =
| Some row => <xml>{[row.Foo01.Bar]}</xml>}
</body></xml>
-fun cache10 () =
- res <- queryX (SELECT foo10.Bar FROM foo10 WHERE foo10.Id = 42)
- (fn row => <xml>{[row.Foo10.Bar]}</xml>);
- return <xml><body>
- Reading 2.
- {res}
- </body></xml>
+(* fun cache10 () = *)
+(* res <- queryX (SELECT foo10.Bar FROM foo10 WHERE foo10.Id = 42) *)
+(* (fn row => <xml>{[row.Foo10.Bar]}</xml>); *)
+(* return <xml><body> *)
+(* Reading 2. *)
+(* {res} *)
+(* </body></xml> *)
-fun cache11 () =
- res <- oneOrNoRows (SELECT foo01.Bar FROM foo01 WHERE foo01.Id = 42);
- bla <- oneOrNoRows (SELECT foo10.Bar FROM foo10 WHERE foo10.Id = 42);
- return <xml><body>
- Reading 1 and 2.
- {case res of
- None => <xml>?</xml>
- | Some row => <xml>{[row.Foo01.Bar]}</xml>}
- {case bla of
- None => <xml>?</xml>
- | Some row => <xml>{[row.Foo10.Bar]}</xml>}
- </body></xml>
+(* fun cache11 () = *)
+(* res <- oneOrNoRows (SELECT foo01.Bar FROM foo01 WHERE foo01.Id = 42); *)
+(* bla <- oneOrNoRows (SELECT foo10.Bar FROM foo10 WHERE foo10.Id = 42); *)
+(* return <xml><body> *)
+(* Reading 1 and 2. *)
+(* {case res of *)
+(* None => <xml>?</xml> *)
+(* | Some row => <xml>{[row.Foo01.Bar]}</xml>} *)
+(* {case bla of *)
+(* None => <xml>?</xml> *)
+(* | Some row => <xml>{[row.Foo10.Bar]}</xml>} *)
+(* </body></xml> *)
fun flush01 () =
dml (INSERT INTO foo01 (Id, Bar) VALUES (42, "baz01"));
@@ -39,18 +39,18 @@ fun flush01 () =
Flushed 1!
</body></xml>
-fun flush10 () =
- dml (UPDATE foo10 SET Bar = "baz10" WHERE Id = 42);
- return <xml><body>
- Flushed 2!
- </body></xml>
+(* fun flush10 () = *)
+(* dml (UPDATE foo10 SET Bar = "baz10" WHERE Id = 42); *)
+(* return <xml><body> *)
+(* Flushed 2! *)
+(* </body></xml> *)
-fun flush11 () =
- dml (UPDATE foo01 SET Bar = "baz11" WHERE Id = 42);
- dml (UPDATE foo10 SET Bar = "baz11" WHERE Id = 42);
- return <xml><body>
- Flushed 1 and 2!
- </body></xml>
+(* fun flush11 () = *)
+(* dml (UPDATE foo01 SET Bar = "baz11" WHERE Id = 42); *)
+(* dml (UPDATE foo10 SET Bar = "baz11" WHERE Id = 42); *)
+(* return <xml><body> *)
+(* Flushed 1 and 2! *)
+(* </body></xml> *)
fun cache id =
res <- oneOrNoRows (SELECT tab.Val FROM tab WHERE tab.Id = {[id]});
@@ -63,9 +63,9 @@ fun cache id =
fun flush id =
res <- oneOrNoRows (SELECT tab.Val FROM tab WHERE tab.Id = {[id]});
- dml (case res of
- None => (INSERT INTO tab (Id, Val) VALUES ({[id]}, 0))
- | Some row => (UPDATE tab SET Val = {[row.Tab.Val + 1]} WHERE Id = {[id]}));
+ (case res of
+ None => dml (INSERT INTO tab (Id, Val) VALUES ({[id]}, 0))
+ | Some row => dml (UPDATE tab SET Val = {[row.Tab.Val + 1]} WHERE Id = {[id]}));
return <xml><body>
(* Flushed {[id]}! *)
{case res of