comparison caching-tests/test.ur @ 2218:f7113855f3b7

More invalidation progress.
author Ziv Scully <ziv@mit.edu>
date Tue, 11 Nov 2014 04:25:20 -0500
parents 639e62ca2530
children 278e10629ba1
comparison
equal deleted inserted replaced
2217:98b87d905601 2218:f7113855f3b7
1 table foo01 : {Id : int, Bar : string} PRIMARY KEY Id 1 table foo01 : {Id : int, Bar : string} PRIMARY KEY Id
2 table foo10 : {Id : int, Bar : string} PRIMARY KEY Id 2 table foo10 : {Id : int, Bar : string} PRIMARY KEY Id
3 table tab : {Id : int, Val : int} PRIMARY KEY Id 3 table tab : {Id : int, Val : int} PRIMARY KEY Id
4 4
5 fun cache01 () = 5 fun cache01 () =
6 res <- oneOrNoRows (SELECT foo01.Bar FROM foo01 WHERE foo01.Id = 42); 6 res <- oneOrNoRows (SELECT foo01.Bar FROM foo01 WHERE foo01.Id = 43);
7 return <xml><body> 7 return <xml><body>
8 Reading 1. 8 Reading 1.
9 {case res of 9 {case res of
10 None => <xml>?</xml> 10 None => <xml>?</xml>
11 | Some row => <xml>{[row.Foo01.Bar]}</xml>} 11 | Some row => <xml>{[row.Foo01.Bar]}</xml>}
31 None => <xml>?</xml> 31 None => <xml>?</xml>
32 | Some row => <xml>{[row.Foo10.Bar]}</xml>} 32 | Some row => <xml>{[row.Foo10.Bar]}</xml>}
33 </body></xml> 33 </body></xml>
34 34
35 fun flush01 () = 35 fun flush01 () =
36 dml (UPDATE foo01 SET Bar = "baz01" WHERE Id = 42); 36 dml (INSERT INTO foo01 (Id, Bar) VALUES (42, "baz01"));
37 (* dml (UPDATE foo01 SET Bar = "baz01" WHERE Id = 42); *)
37 return <xml><body> 38 return <xml><body>
38 Flushed 1! 39 Flushed 1!
39 </body></xml> 40 </body></xml>
40 41
41 fun flush10 () = 42 fun flush10 () =