comparison 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
comparison
equal deleted inserted replaced
338:e976b187d73a 339:075b36dbb1a4
1 con colMeta' = fn t :: Type => {Nam : string, Show : t -> xbody} 1 con colMeta = fn t_formT :: (Type * Type) => {
2 con colMeta = fn cols :: {Type} => $(Top.mapTT colMeta' cols) 2 Nam : string,
3 Show : t_formT.1 -> xbody,
4 Widget : nm :: Name -> xml form [] [nm = t_formT.2],
5 Parse : t_formT.2 -> t_formT.1,
6 Inject : sql_injectable t_formT.1
7 }
8 con colsMeta = fn cols :: {(Type * Type)} => $(Top.mapT2T colMeta cols)
3 9
4 functor Make(M : sig 10 functor Make(M : sig
5 con cols :: {Type} 11 con cols :: {(Type * Type)}
6 constraint [Id] ~ cols 12 constraint [Id] ~ cols
7 val tab : sql_table ([Id = int] ++ cols) 13 val tab : sql_table ([Id = int] ++ mapT2T fstTT cols)
8 14
9 val title : string 15 val title : string
10 16
11 val cols : colMeta cols 17 val cols : colsMeta cols
12 end) : sig 18 end) : sig
13 val main : unit -> transaction page 19 val main : unit -> transaction page
14 end 20 end