From 0c231060050adf556348b06f078c994f4a0e65b4 Mon Sep 17 00:00:00 2001 From: Ziv Scully Date: Thu, 19 Nov 2015 03:45:39 -0500 Subject: Fix SQL parser JOIN bug and fix ON clause logic in Sqlcache. --- caching-tests/test.ur | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'caching-tests') diff --git a/caching-tests/test.ur b/caching-tests/test.ur index ea64bb2d..e0dab927 100644 --- a/caching-tests/test.ur +++ b/caching-tests/test.ur @@ -1,12 +1,13 @@ table tab : {Id : int, Val : int, Foo : int} PRIMARY KEY Id fun cache id = - res <- oneOrNoRows (SELECT tab.Val FROM tab WHERE tab.Id = {[id]}); + res <- oneOrNoRows (SELECT A.Val FROM (tab AS A JOIN tab AS B ON A.Id = B.Id) + WHERE B.Id = {[id]}); return cache {case res of None => ? - | Some row => {[row.Tab.Val]}} + | Some row => {[row.A.Val]}} (* fun cacheAlt id = *) -- cgit v1.2.3