comparison lib/ur/basis.urs @ 1682:ac141fbb313a

'ORDER BY RANDOM' (based on a patch from Ron de Bruijn)
author Adam Chlipala <adam@chlipala.net>
date Thu, 02 Feb 2012 11:40:10 -0500
parents b0720700c36e
children 225b87d4a7df
comparison
equal deleted inserted replaced
1681:e8a84494d2c0 1682:ac141fbb313a
397 SelectFields : sql_subset grouped (map (fn _ => []) empties ++ selectedFields), 397 SelectFields : sql_subset grouped (map (fn _ => []) empties ++ selectedFields),
398 SelectExps : $(map (sql_exp (free ++ grouped) (afree ++ tables) []) 398 SelectExps : $(map (sql_exp (free ++ grouped) (afree ++ tables) [])
399 selectedExps) } 399 selectedExps) }
400 -> sql_query1 free afree tables selectedFields selectedExps 400 -> sql_query1 free afree tables selectedFields selectedExps
401 401
402 type sql_relop 402 type sql_relop
403 val sql_union : sql_relop 403 val sql_union : sql_relop
404 val sql_intersect : sql_relop 404 val sql_intersect : sql_relop
405 val sql_except : sql_relop 405 val sql_except : sql_relop
406 val sql_relop : free ::: {{Type}} 406 val sql_relop : free ::: {{Type}}
407 -> afree ::: {{Type}} 407 -> afree ::: {{Type}}
426 val sql_order_by_Nil : tables ::: {{Type}} -> exps :: {Type} -> sql_order_by tables exps 426 val sql_order_by_Nil : tables ::: {{Type}} -> exps :: {Type} -> sql_order_by tables exps
427 val sql_order_by_Cons : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type 427 val sql_order_by_Cons : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
428 -> sql_exp tables [] exps t -> sql_direction 428 -> sql_exp tables [] exps t -> sql_direction
429 -> sql_order_by tables exps 429 -> sql_order_by tables exps
430 -> sql_order_by tables exps 430 -> sql_order_by tables exps
431 val sql_order_by_random : tables ::: {{Type}} -> exps ::: {Type}
432 -> sql_order_by tables exps
431 433
432 type sql_limit 434 type sql_limit
433 val sql_no_limit : sql_limit 435 val sql_no_limit : sql_limit
434 val sql_limit : int -> sql_limit 436 val sql_limit : int -> sql_limit
435 437
436 type sql_offset 438 type sql_offset
437 val sql_no_offset : sql_offset 439 val sql_no_offset : sql_offset
438 val sql_offset : int -> sql_offset 440 val sql_offset : int -> sql_offset
439 441
440 val sql_query : free ::: {{Type}} 442 val sql_query : free ::: {{Type}}
649 -> $attrsGiven 651 -> $attrsGiven
650 -> tag (attrsGiven ++ attrsAbsent) 652 -> tag (attrsGiven ++ attrsAbsent)
651 ctxOuter ctxInner useOuter bindOuter 653 ctxOuter ctxInner useOuter bindOuter
652 -> xml ctxInner useInner bindInner 654 -> xml ctxInner useInner bindInner
653 -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner) 655 -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner)
654 val join : ctx ::: {Unit} 656 val join : ctx ::: {Unit}
655 -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type} 657 -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type}
656 -> [use1 ~ bind1] => [bind1 ~ bind2] => 658 -> [use1 ~ bind1] => [bind1 ~ bind2] =>
657 xml ctx use1 bind1 659 xml ctx use1 bind1
658 -> xml ctx (use1 ++ bind1) bind2 660 -> xml ctx (use1 ++ bind1) bind2
659 -> xml ctx use1 (bind1 ++ bind2) 661 -> xml ctx use1 (bind1 ++ bind2)
767 val a : bodyTag ([Link = transaction page, Href = url, Target = string] ++ boxAttrs) 769 val a : bodyTag ([Link = transaction page, Href = url, Target = string] ++ boxAttrs)
768 770
769 val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int, 771 val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int,
770 Onabort = transaction unit, Onerror = transaction unit, 772 Onabort = transaction unit, Onerror = transaction unit,
771 Onload = transaction unit] ++ boxAttrs) 773 Onload = transaction unit] ++ boxAttrs)
772 774
773 val form : ctx ::: {Unit} -> bind ::: {Type} 775 val form : ctx ::: {Unit} -> bind ::: {Type}
774 -> [[MakeForm, Form] ~ ctx] => 776 -> [[MakeForm, Form] ~ ctx] =>
775 option css_class 777 option css_class
776 -> xml ([Form] ++ ctx) [] bind 778 -> xml ([Form] ++ ctx) [] bind
777 -> xml ([MakeForm] ++ ctx) [] [] 779 -> xml ([MakeForm] ++ ctx) [] []
778 780
779 val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} 781 val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type}
780 -> [[Form] ~ ctx] => 782 -> [[Form] ~ ctx] =>
781 nm :: Name -> [[nm] ~ use] => 783 nm :: Name -> [[nm] ~ use] =>
782 xml ([Form] ++ ctx) [] bind 784 xml ([Form] ++ ctx) [] bind
783 -> xml ([Form] ++ ctx) use [nm = $bind] 785 -> xml ([Form] ++ ctx) use [nm = $bind]