ziv@2203: table foo01 : {Id : int, Bar : string} PRIMARY KEY Id
ziv@2203: table foo10 : {Id : int, Bar : string} PRIMARY KEY Id
ziv@2203:
ziv@2204: fun flush01 () : transaction page =
ziv@2204: dml (INSERT INTO foo01 (Id, Bar) VALUES (42, "baz01"));
ziv@2204: dml (UPDATE foo01 SET Bar = "baz01" WHERE Id = 42);
ziv@2204: return
ziv@2204: Flushed 1!
ziv@2204:
ziv@2203:
ziv@2204: fun flush10 () : transaction page =
ziv@2204: dml (UPDATE foo10 SET Bar = "baz10" WHERE Id = 42);
ziv@2204: return
ziv@2204: Flushed 2!
ziv@2204:
ziv@2203:
ziv@2204: fun flush11 () : transaction page =
ziv@2204: dml (UPDATE foo01 SET Bar = "baz11" WHERE Id = 42);
ziv@2204: dml (UPDATE foo10 SET Bar = "baz11" WHERE Id = 42);
ziv@2204: return
ziv@2204: Flushed 1 and 2!
ziv@2204:
ziv@2203:
ziv@2203: fun cache01 () : transaction page =
ziv@2204: res <- oneOrNoRows (SELECT foo01.Bar FROM foo01 WHERE foo01.Id = 42);
ziv@2204: return
ziv@2204: Reading 1.
ziv@2204: {case res of
ziv@2204: None =>
ziv@2204: | Some row => {[row.Foo01.Bar]}}
ziv@2204:
ziv@2203:
ziv@2203: fun cache10 () : transaction page =
ziv@2204: res <- oneOrNoRows (SELECT foo10.Bar FROM foo10 WHERE foo10.Id = 42);
ziv@2204: return
ziv@2204: Reading 2.
ziv@2204: {case res of
ziv@2204: None =>
ziv@2204: | Some row => {[row.Foo10.Bar]}}
ziv@2204:
ziv@2203:
ziv@2203: fun cache11 () : transaction page =
ziv@2204: res <- oneOrNoRows (SELECT foo01.Bar FROM foo01 WHERE foo01.Id = 42);
ziv@2204: bla <- oneOrNoRows (SELECT foo10.Bar FROM foo10 WHERE foo10.Id = 42);
ziv@2204: return
ziv@2204: Reading 1 and 2.
ziv@2204: {case res of
ziv@2204: None =>
ziv@2204: | Some row => {[row.Foo01.Bar]}}
ziv@2204: {case bla of
ziv@2204: None =>
ziv@2204: | Some row => {[row.Foo10.Bar]}}
ziv@2204: