summaryrefslogtreecommitdiff
path: root/lib/ur/basis.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-06-02 16:47:09 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-06-02 16:47:09 -0400
commit858481a426ea3873440c3bed30eb563f8cf3480e (patch)
tree16d85bb575a9248e5c830e757a822240f8fa04ff /lib/ur/basis.urs
parent8b6941ac380392e36a30a06fb558c47a8fe7d2d8 (diff)
Partitioning and ordering for window functions
Diffstat (limited to 'lib/ur/basis.urs')
-rw-r--r--lib/ur/basis.urs13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index 2a4d28cf..68e20fb0 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -552,7 +552,7 @@ class sql_summable
val sql_summable_int : sql_summable int
val sql_summable_float : sql_summable float
val sql_summable_option : t ::: Type -> sql_summable t -> sql_summable (option t)
-val sql_avg : t ::: Type -> nt ::: Type -> sql_summable t -> nullify t nt -> sql_aggregate t nt
+val sql_avg : t ::: Type -> sql_summable t -> sql_aggregate t (option float)
val sql_sum : t ::: Type -> nt ::: Type -> sql_summable t -> nullify t nt -> sql_aggregate t nt
class sql_maxable
@@ -564,16 +564,25 @@ val sql_maxable_option : t ::: Type -> sql_maxable t -> sql_maxable (option t)
val sql_max : t ::: Type -> nt ::: Type -> sql_maxable t -> nullify t nt -> sql_aggregate t nt
val sql_min : t ::: Type -> nt ::: Type -> sql_maxable t -> nullify t nt -> sql_aggregate t nt
+con sql_partition :: {{Type}} -> {{Type}} -> {Type} -> Type
+val sql_no_partition : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}
+ -> sql_partition tables agg exps
+val sql_partition : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type} -> t ::: Type
+ -> sql_exp tables agg exps disallow_window t
+ -> sql_partition tables agg exps
+
con sql_window :: {{Type}} -> {{Type}} -> {Type} -> Type -> Type
val sql_window : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}
-> t ::: Type
-> sql_window tables agg exps t
+ -> sql_partition tables agg exps
+ -> sql_order_by tables exps
-> sql_exp tables agg exps allow_window t
val sql_window_aggregate : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}
-> t ::: Type -> nt ::: Type
-> sql_aggregate t nt
- -> sql_exp tables agg exps allow_window t
+ -> sql_exp tables agg exps disallow_window t
-> sql_window tables agg exps nt
val sql_window_count : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}
-> sql_window tables agg exps int