Mercurial > urweb
comparison demo/batchFun.ur @ 1775:6bc2a8cb3a67
Track whether SQL expressions may use window functions, in preparation for actual window function support
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 02 Jun 2012 15:35:58 -0400 |
parents | 68429cfce8db |
children | 818d4097e2ed |
comparison
equal
deleted
inserted
replaced
1774:27fdd78bd2f5 | 1775:6bc2a8cb3a67 |
---|---|
44 Nil | 44 Nil |
45 | 45 |
46 fun add r = | 46 fun add r = |
47 dml (insert t | 47 dml (insert t |
48 (@foldR2 [fst] [colMeta] | 48 (@foldR2 [fst] [colMeta] |
49 [fn cols => $(map (fn t => sql_exp [] [] [] t.1) cols)] | 49 [fn cols => $(map (fn t => sql_exp [] [] [] disallow_window t.1) cols)] |
50 (fn [nm :: Name] [t ::_] [rest ::_] [[nm] ~ rest] input col acc => | 50 (fn [nm :: Name] [t ::_] [rest ::_] [[nm] ~ rest] input col acc => |
51 acc ++ {nm = @sql_inject col.Inject input}) | 51 acc ++ {nm = @sql_inject col.Inject input}) |
52 {} M.fl (r -- #Id) M.cols | 52 {} M.fl (r -- #Id) M.cols |
53 ++ {Id = (SQL {[r.Id]})})) | 53 ++ {Id = (SQL {[r.Id]})})) |
54 | 54 |