Mercurial > urweb
view demo/view.ur @ 1522:4d0b80dd4c37
Introduce URWEB_STACK_SIZE environment variable (based on a patch by Hao Deng)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 02 Aug 2011 14:31:37 -0400 |
parents | c7b9a33c26c8 |
children |
line wrap: on
line source
table t : { A : int } view v = SELECT t.A AS A FROM t WHERE t.A > 7 fun list [u] (_ : fieldsOf u [A = int]) (title : string) (x : u) : transaction xbody = xml <- queryX (SELECT * FROM x) (fn r : {X : {A : int}} => <xml><li>{[r.X.A]}</li></xml>); return <xml> <h2>{[title]}</h2> <ul>{xml}</ul> </xml> fun main () = listT <- list "T" t; listV <- list "V" v; return <xml><body> {listT} {listV} <br/> <form>Insert: <textbox{#A}/> <submit action={ins}/></form> </body></xml> and ins r = dml (INSERT INTO t (A) VALUES ({[readError r.A]})); main ()