summaryrefslogtreecommitdiff
path: root/caching-tests
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-19 03:45:39 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-19 03:45:39 -0500
commit0c231060050adf556348b06f078c994f4a0e65b4 (patch)
treef88b73ae276f7df0a9a7543b8d9569312d9fb2a5 /caching-tests
parentbfcd84434ee997b474935aa13ae7bc1f3801d795 (diff)
Fix SQL parser JOIN bug and fix ON clause logic in Sqlcache.
Diffstat (limited to 'caching-tests')
-rw-r--r--caching-tests/test.ur5
1 files changed, 3 insertions, 2 deletions
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 <xml><body>
cache
{case res of
None => <xml>?</xml>
- | Some row => <xml>{[row.Tab.Val]}</xml>}
+ | Some row => <xml>{[row.A.Val]}</xml>}
</body></xml>
(* fun cacheAlt id = *)