diff 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
line wrap: on
line diff
--- a/demo/more/orm.urs	Mon Oct 05 17:00:04 2009 -0400
+++ b/demo/more/orm.urs	Mon Oct 05 17:24:21 2009 -0400
@@ -22,4 +22,21 @@
     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