diff demo/more/dbgrid.urs @ 961:8c37699de273

Grid sorting working
author Adam Chlipala <adamc@hcoop.net>
date Sat, 19 Sep 2009 13:32:33 -0400
parents da3ec6014d2f
children fbc3a0eef45a
line wrap: on
line diff
--- a/demo/more/dbgrid.urs	Sat Sep 19 10:56:09 2009 -0400
+++ b/demo/more/dbgrid.urs	Sat Sep 19 13:32:33 2009 -0400
@@ -11,7 +11,8 @@
                    Validate : input -> signal bool,
                    CreateFilter : transaction filter,
                    DisplayFilter : filter -> xbody,
-                   Filter : filter -> $row -> signal bool}
+                   Filter : filter -> $row -> signal bool,
+                   Sort : option ($row -> $row -> bool)}
 
 con colMeta = fn (row :: {Type}) (global_input_filter :: (Type * Type * Type)) =>
                  {Initialize : transaction global_input_filter.1,
@@ -30,7 +31,8 @@
                    Parse : actual_input_filter.2 -> signal (option actual_input_filter.1),
                    CreateFilter : transaction actual_input_filter.3,
                    DisplayFilter : actual_input_filter.3 -> xbody,
-                   Filter : actual_input_filter.3 -> actual_input_filter.1 -> signal bool}
+                   Filter : actual_input_filter.3 -> actual_input_filter.1 -> signal bool,
+                   Sort : actual_input_filter.1 -> actual_input_filter.1 -> bool}
 
     datatype metaBoth actual input filter =
              NonNull of metaBase (actual, input, filter) * metaBase (option actual, input, filter)
@@ -79,6 +81,7 @@
                          val show_t : show t
                          val read_t : read t
                          val eq_t : eq t
+                         val ord_t : ord t
                          val inj_t : sql_injectable t
                          con nm :: Name
                          constraint [nm] ~ row