Mercurial > urweb
comparison demo/batchFun.ur @ 1778:818d4097e2ed
Lighter-weight encoding of window function use
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 03 Jun 2012 11:29:31 -0400 |
parents | 6bc2a8cb3a67 |
children | e6bc6bbd7a32 |
comparison
equal
deleted
inserted
replaced
1777:59b07fdae1ff | 1778:818d4097e2ed |
---|---|
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 [] [] [] disallow_window t.1) cols)] | 49 [fn cols => $(map (fn t => sql_exp [] [] [] 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 |