summaryrefslogtreecommitdiff
path: root/demo/more/orm.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-10-05 17:24:21 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-10-05 17:24:21 -0400
commit51ab6fecd3f6bd527d9cc044bdd33a9f4ad87c4d (patch)
treee5addfd6a235083f17d8cf8a65783f0a8600a370 /demo/more/orm.urs
parent1e783d6009ff2973fd793a7bfb3f45bd63ed590c (diff)
Orm searching
Diffstat (limited to 'demo/more/orm.urs')
-rw-r--r--demo/more/orm.urs17
1 files changed, 17 insertions, 0 deletions
diff --git a/demo/more/orm.urs b/demo/more/orm.urs
index f25f9ff0..f284d3ec 100644
--- a/demo/more/orm.urs
+++ b/demo/more/orm.urs
@@ -22,4 +22,21 @@ functor Table(M : sig
val save : row -> transaction unit
val lookup : id -> transaction (option row)
val list : transaction (list row)
+
+ con col :: Type -> Type
+ val idCol : col id
+ val cols : $(map col M.cols)
+
+ type filter
+ val search : filter -> transaction (list row)
+
+ val eq : t ::: Type -> col t -> t -> filter
+ val ne : t ::: Type -> col t -> t -> filter
+ val lt : t ::: Type -> col t -> t -> filter
+ val le : t ::: Type -> col t -> t -> filter
+ val gt : t ::: Type -> col t -> t -> filter
+ val ge : t ::: Type -> col t -> t -> filter
+
+ val _and : filter -> filter -> filter
+ val or : filter -> filter -> filter
end