summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-26 12:35:45 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-26 12:35:45 -0400
commit91a8659bde5f3d6aba9a356f07cc1afb31d67775 (patch)
tree122ba347fb6260488aaec3aca188e6600d0125f9 /src/urweb.grm
parentd824fdd52fb824a6a9db9fb3cc32cfb28746d04b (diff)
sql_ufunc and octet_length
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 50d0c803..be67ea7b 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -329,6 +329,7 @@ datatype attr = Class of exp | Normal of con * exp
| ofopt of exp
| sqlint of exp
| sqlagg of string
+ | fname of exp
| texp of exp
| fields of con list
@@ -1536,6 +1537,17 @@ sqlexp : TRUE (sql_inject (EVar (["Basis"], "True", In
in
(EApp (e, sqlexp), loc)
end)
+ | fname LPAREN sqlexp RPAREN (let
+ val loc = s (fnameleft, RPARENright)
+
+ val e = (EVar (["Basis"], "sql_ufunc", Infer), loc)
+ val e = (EApp (e, fname), loc)
+ in
+ (EApp (e, sqlexp), loc)
+ end)
+
+fname : SYMBOL (EVar (["Basis"], "sql_" ^ SYMBOL, Infer), s (SYMBOLleft, SYMBOLright))
+ | LBRACE eexp RBRACE (eexp)
wopt : (sql_inject (EVar (["Basis"], "True", Infer),
dummy))