summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-12-23 12:24:38 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2014-12-23 12:24:38 -0500
commit26452ecc4b83760962e180a9949e5020cb360cc2 (patch)
treeaa15b4fd859b5eb222426cefe3ecadf21e6b96dd
parent6e9e97242c177c7fbc71678e2b495687ace312f0 (diff)
New antiquote syntax for ORDER BY
-rw-r--r--doc/manual.tex2
-rw-r--r--src/urweb.grm1
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/manual.tex b/doc/manual.tex
index 5935ccbf..eb80e0d5 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -2263,7 +2263,7 @@ $$\begin{array}{rrcll}
\textrm{Pre-queries} & q &::=& \mt{SELECT} \; [\mt{DISTINCT}] \; P \; \mt{FROM} \; F,^+ \; [\mt{WHERE} \; E] \; [\mt{GROUP} \; \mt{BY} \; p,^+] \; [\mt{HAVING} \; E] \\
&&& \mid q \; R \; q \mid \{\{\{e\}\}\} \\
\textrm{Relational operators} & R &::=& \mt{UNION} \mid \mt{INTERSECT} \mid \mt{EXCEPT} \\
- \textrm{$\mt{ORDER \; BY}$ items} & O &::=& \mt{RANDOM} [()] \mid \hat{E} \; [o] \mid \hat{E} \; [o], O
+ \textrm{$\mt{ORDER \; BY}$ items} & O &::=& \mt{RANDOM} [()] \mid \hat{E} \; [o] \mid \hat{E} \; [o], O \mid \{\{\{e\}\}\}
\end{array}$$
$$\begin{array}{rrcll}
diff --git a/src/urweb.grm b/src/urweb.grm
index 995d1329..56e6d2ac 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -2235,6 +2235,7 @@ obopt : (ECApp ((EVar (["Basis"], "sql_order_by_
(CWild (KRecord (KType, dummy), dummy), dummy)),
dummy)
| ORDER BY obexps (obexps)
+ | ORDER BY LBRACE LBRACE LBRACE eexp RBRACE RBRACE RBRACE (eexp)
obitem : sqlexp diropt (sqlexp, diropt)