diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-02-02 11:40:10 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-02-02 11:40:10 -0500 |
commit | 1a92bdc65a47614912b4bfd0cf6f442d7134ce23 (patch) | |
tree | 5271983ec2581bb6cf7fecc8053b8c3e41de9250 /src/urweb.grm | |
parent | 912c6fcf0c09348965262dd13c8faaefa61c2999 (diff) |
'ORDER BY RANDOM' (based on a patch from Ron de Bruijn)
Diffstat (limited to 'src/urweb.grm')
-rw-r--r-- | src/urweb.grm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/urweb.grm b/src/urweb.grm index a495bfe6..7d2bc96b 100644 --- a/src/urweb.grm +++ b/src/urweb.grm @@ -276,7 +276,7 @@ fun tnamesOf (e, _) = | LIMIT | OFFSET | ALL | TRUE | FALSE | CAND | OR | NOT | COUNT | AVG | SUM | MIN | MAX - | ASC | DESC + | ASC | DESC | RANDOM | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS | COALESCE | LIKE | CURRENT_TIMESTAMP | NE | LT | LE | GT | GE @@ -405,6 +405,7 @@ fun tnamesOf (e, _) = | obopt of exp | obitem of exp * exp | obexps of exp + | popt of unit | diropt of exp | lopt of exp | ofopt of exp @@ -2034,6 +2035,10 @@ obexps : obitem (let in (EApp (e, obexps), loc) end) + | RANDOM popt (EVar (["Basis"], "sql_order_by_random", Infer), s (RANDOMleft, poptright)) + +popt : () + | LPAREN RPAREN () diropt : (EVar (["Basis"], "sql_asc", Infer), dummy) | ASC (EVar (["Basis"], "sql_asc", Infer), s (ASCleft, ASCright)) |