Mercurial > urweb
annotate tests/crud.urs @ 339:075b36dbb1a4
Crud supports INSERT
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 14 Sep 2008 15:10:04 -0400 |
parents | 34847732cefc |
children | 389399d65331 |
rev | line source |
---|---|
adamc@339 | 1 con colMeta = fn t_formT :: (Type * Type) => { |
adamc@339 | 2 Nam : string, |
adamc@339 | 3 Show : t_formT.1 -> xbody, |
adamc@339 | 4 Widget : nm :: Name -> xml form [] [nm = t_formT.2], |
adamc@339 | 5 Parse : t_formT.2 -> t_formT.1, |
adamc@339 | 6 Inject : sql_injectable t_formT.1 |
adamc@339 | 7 } |
adamc@339 | 8 con colsMeta = fn cols :: {(Type * Type)} => $(Top.mapT2T colMeta cols) |
adamc@326 | 9 |
adamc@325 | 10 functor Make(M : sig |
adamc@339 | 11 con cols :: {(Type * Type)} |
adamc@325 | 12 constraint [Id] ~ cols |
adamc@339 | 13 val tab : sql_table ([Id = int] ++ mapT2T fstTT cols) |
adamc@325 | 14 |
adamc@325 | 15 val title : string |
adamc@325 | 16 |
adamc@339 | 17 val cols : colsMeta cols |
adamc@325 | 18 end) : sig |
adamc@325 | 19 val main : unit -> transaction page |
adamc@325 | 20 end |