comparison demo/more/orm.urs @ 989:0bdc4d538f1c

Orm searching
author Adam Chlipala <adamc@hcoop.net>
date Mon, 05 Oct 2009 17:24:21 -0400
parents d923b47e483d
children 46803e668a89
comparison
equal deleted inserted replaced
988:d923b47e483d 989:0bdc4d538f1c
20 val create : $M.cols -> transaction row 20 val create : $M.cols -> transaction row
21 val delete : row -> transaction unit 21 val delete : row -> transaction unit
22 val save : row -> transaction unit 22 val save : row -> transaction unit
23 val lookup : id -> transaction (option row) 23 val lookup : id -> transaction (option row)
24 val list : transaction (list row) 24 val list : transaction (list row)
25
26 con col :: Type -> Type
27 val idCol : col id
28 val cols : $(map col M.cols)
29
30 type filter
31 val search : filter -> transaction (list row)
32
33 val eq : t ::: Type -> col t -> t -> filter
34 val ne : t ::: Type -> col t -> t -> filter
35 val lt : t ::: Type -> col t -> t -> filter
36 val le : t ::: Type -> col t -> t -> filter
37 val gt : t ::: Type -> col t -> t -> filter
38 val ge : t ::: Type -> col t -> t -> filter
39
40 val _and : filter -> filter -> filter
41 val or : filter -> filter -> filter
25 end 42 end