From aa2c8c64542d7930773da26573e186ec3753c268 Mon Sep 17 00:00:00 2001 From: Ziv Scully Date: Mon, 9 Nov 2015 13:37:31 -0500 Subject: Progress on free paths, but consolidation seems to fail more with them. --- caching-tests/test.ur | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'caching-tests/test.ur') diff --git a/caching-tests/test.ur b/caching-tests/test.ur index e08c6e47..0549840d 100644 --- a/caching-tests/test.ur +++ b/caching-tests/test.ur @@ -5,7 +5,23 @@ fun cache id = FROM tab WHERE tab.Id = {[id]}); return - Reading {[id]}. + (* Reading {[id]}. *) + {case res of + None => ? + | Some row => {[row.Tab.Val]}} + + +(* fun sillyRecursive {Id = id, FooBar = fooBar} = *) +(* if fooBar <= 0 *) +(* then 0 *) +(* else 1 + sillyRecursive {Id = id, FooBar = fooBar - 1} *) + +fun cacheR (r : {Id : int, FooBar : int}) = + res <- oneOrNoRows (SELECT tab.Val + FROM tab + WHERE tab.Id = {[r.Id]}); + return + (* Reading {[r.Id]}. *) {case res of None => ? | Some row => {[row.Tab.Val]}} -- cgit v1.2.3