comparison caching-tests/test.ur @ 2239:f70a91f7810d

Add limited support for parsing SQL arithmetic.
author Ziv Scully <ziv@mit.edu>
date Tue, 07 Jul 2015 00:07:24 -0700
parents 7f92d70a326e
children 200a7ed4343b
comparison
equal deleted inserted replaced
2238:7f92d70a326e 2239:f70a91f7810d
9 {case res of 9 {case res of
10 None => <xml>?</xml> 10 None => <xml>?</xml>
11 | Some row => <xml>{[row.Tab.Val]}</xml>} 11 | Some row => <xml>{[row.Tab.Val]}</xml>}
12 </body></xml> 12 </body></xml>
13 13
14
15 fun flush id = 14 fun flush id =
16 dml (UPDATE tab 15 dml (UPDATE tab
17 SET Id = 29, Val = 42 16 SET Val = Val * (Id + 2) / Val - 3
18 WHERE Id = {[id]} OR Id = {[id - 1]} OR Id = {[id + 1]}); 17 WHERE Id = {[id]} OR Id = {[id - 1]} OR Id = {[id + 1]});
19 return <xml><body> 18 return <xml><body>
20 Changed {[id]}! 19 Changed {[id]}!
21 </body></xml> 20 </body></xml>
22 21
23 (* fun flush id = *) 22 (* fun flush id = *)