-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpickerGrid.urs
25 lines (20 loc) · 1.18 KB
/
pickerGrid.urs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(* Displaying selected fields of a table (subject to a filtering condition),
* allowing some to be edited with widgets *)
functor Make(M : sig
con hidden :: {Type}
con static :: {Type}
con dynamic :: {(Type * Type * Type)}
constraint hidden ~ static
constraint (hidden ++ static) ~ dynamic
table t : (hidden ++ static ++ map fst3 dynamic)
val shows : $(map show static)
val eqs : $(map eq static)
val widgets : $(map Widget.t' dynamic)
val labels : $(map (fn _ => string) static ++ map (fn _ => string) dynamic)
val fls : folder static
val fld : folder dynamic
val injs : $(map sql_injectable static)
val injd : $(map (fn p => sql_injectable p.1) dynamic)
val amAuthorized : transaction bool (* Is this user allowed to use this interface? *)
end) : Ui.S where type input = sql_exp [T = M.hidden ++ M.static ++ map fst3 M.dynamic] [] [] bool
(* Warning: [static] should really serve as a key for the table, or hijinks will ensue! *)