From 51ab6fecd3f6bd527d9cc044bdd33a9f4ad87c4d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 5 Oct 2009 17:24:21 -0400 Subject: Orm searching --- demo/more/orm.urs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'demo/more/orm.urs') 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 -- cgit v1.2.3