diff options
Diffstat (limited to 'caching-tests')
-rw-r--r-- | caching-tests/test.ur | 11 | ||||
-rw-r--r-- | caching-tests/test.urs | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/caching-tests/test.ur b/caching-tests/test.ur index 578d59b3..00f05768 100644 --- a/caching-tests/test.ur +++ b/caching-tests/test.ur @@ -11,6 +11,17 @@ fun cache id = | Some row => <xml>{[row.Tab.Val]}</xml>} </body></xml> +fun cache2 id v = + res <- oneOrNoRows (SELECT tab.Val + FROM tab + WHERE tab.Id = {[id]} AND tab.Val = {[v]}); + return <xml><body> + Reading {[id]}. + {case res of + None => <xml>Nope, that's not it.</xml> + | Some _ => <xml>Hooray! You guessed it!</xml>} + </body></xml> + fun flush id = dml (UPDATE tab SET Val = Val * (Id + 2) / Val - 3 diff --git a/caching-tests/test.urs b/caching-tests/test.urs index e9e09ac8..fc23c47d 100644 --- a/caching-tests/test.urs +++ b/caching-tests/test.urs @@ -1,3 +1,4 @@ val cache : int -> transaction page +val cache2 : int -> int -> transaction page val flush : int -> transaction page val flush17 : transaction page |