diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-06-03 11:29:31 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-06-03 11:29:31 -0400 |
commit | 6cd9389c53382c936a8bd71c92873906624d2a4e (patch) | |
tree | deacf0a9ebedccbc3e22fdb143c51d3dcc153a5b /demo/more/orm.ur | |
parent | ecb92d9539880cc59a371c786af5312b833ff8ca (diff) |
Lighter-weight encoding of window function use
Diffstat (limited to 'demo/more/orm.ur')
-rw-r--r-- | demo/more/orm.ur | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/demo/more/orm.ur b/demo/more/orm.ur index 2e1fc2e0..468281f7 100644 --- a/demo/more/orm.ur +++ b/demo/more/orm.ur @@ -32,8 +32,8 @@ functor Table(M : sig val id = {Link = fn id => resultOut (SELECT * FROM t WHERE t.Id = {[id]}), Inj = inj} - fun ensql [avail ::_] (r : row') : $(map (sql_exp avail [] [] disallow_window) fs') = - @map2 [meta] [fst] [fn ts :: (Type * Type) => sql_exp avail [] [] disallow_window ts.1] + fun ensql [avail ::_] (r : row') : $(map (sql_exp avail [] []) fs') = + @map2 [meta] [fst] [fn ts :: (Type * Type) => sql_exp avail [] [] ts.1] (fn [ts] meta v => @sql_inject meta.Inj v) M.folder M.cols r @@ -53,11 +53,11 @@ functor Table(M : sig val list = resultsOut (SELECT * FROM t) - con col = fn t => {Exp : sql_exp [T = fs] [] [] disallow_window t, + con col = fn t => {Exp : sql_exp [T = fs] [] [] t, Inj : sql_injectable t} val idCol = {Exp = sql_field [#T] [#Id], Inj = _} con meta' = fn (fs :: {Type}) (col :: Type, parent :: Type) => - {Col : {Exp : sql_exp [T = fs] [] [] disallow_window col, + {Col : {Exp : sql_exp [T = fs] [] [] col, Inj : sql_injectable col}, Parent : $fs -> transaction (option parent)} val cols = @foldR [meta] [fn before => after :: {(Type * Type)} -> [before ~ after] => @@ -75,7 +75,7 @@ functor Table(M : sig M.folder M.cols [[Id = (id, row)]] ! - type filter = sql_exp [T = fs] [] [] disallow_window bool + type filter = sql_exp [T = fs] [] [] bool fun find (f : filter) = resultOut (SELECT * FROM t WHERE {f}) fun search (f : filter) = resultsOut (SELECT * FROM t WHERE {f}) |