blob: f25f9ff0b606331035343df1bad45af4f6225e75 (
plain)
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
|
con link :: Type -> Type
con meta = fn col :: Type => {
Link : link col,
Inj : sql_injectable col
}
functor Table(M : sig
con cols :: {Type}
val cols : $(map meta cols)
constraint [Id] ~ cols
val folder : folder cols
end) : sig
type id
val inj : sql_injectable id
val id : meta id
type row = $([Id = id] ++ M.cols)
val create : $M.cols -> transaction row
val delete : row -> transaction unit
val save : row -> transaction unit
val lookup : id -> transaction (option row)
val list : transaction (list row)
end
|