comparison src/urweb.grm @ 1602:e44be6ece475

COALESCE
author Adam Chlipala <adam@chlipala.net>
date Sat, 19 Nov 2011 10:43:57 -0500
parents 911ebbd23919
children da788bd72c9e
comparison
equal deleted inserted replaced
1601:78e0d56b594e 1602:e44be6ece475
242 | UNION | INTERSECT | EXCEPT 242 | UNION | INTERSECT | EXCEPT
243 | LIMIT | OFFSET | ALL 243 | LIMIT | OFFSET | ALL
244 | TRUE | FALSE | CAND | OR | NOT 244 | TRUE | FALSE | CAND | OR | NOT
245 | COUNT | AVG | SUM | MIN | MAX 245 | COUNT | AVG | SUM | MIN | MAX
246 | ASC | DESC 246 | ASC | DESC
247 | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS 247 | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS | COALESCE
248 | CURRENT_TIMESTAMP 248 | CURRENT_TIMESTAMP
249 | NE | LT | LE | GT | GE 249 | NE | LT | LE | GT | GE
250 | CCONSTRAINT | UNIQUE | CHECK | PRIMARY | FOREIGN | KEY | ON | NO | ACTION | RESTRICT | CASCADE | REFERENCES 250 | CCONSTRAINT | UNIQUE | CHECK | PRIMARY | FOREIGN | KEY | ON | NO | ACTION | RESTRICT | CASCADE | REFERENCES
251 | JOIN | INNER | CROSS | OUTER | LEFT | RIGHT | FULL 251 | JOIN | INNER | CROSS | OUTER | LEFT | RIGHT | FULL
252 | CIF | CTHEN | CELSE 252 | CIF | CTHEN | CELSE
1879 val e = (EApp ((EVar (["Basis"], "sql_aggregate", Infer), loc), 1879 val e = (EApp ((EVar (["Basis"], "sql_aggregate", Infer), loc),
1880 e), loc) 1880 e), loc)
1881 in 1881 in
1882 (EApp (e, sqlexp), loc) 1882 (EApp (e, sqlexp), loc)
1883 end) 1883 end)
1884 | COALESCE LPAREN sqlexp COMMA sqlexp RPAREN
1885 (let
1886 val loc = s (COALESCEright, sqlexp2right)
1887 val e = (EVar (["Basis"], "sql_coalesce", Infer), loc)
1888 val e = (EApp (e, sqlexp1), loc)
1889 in
1890 (EApp (e, sqlexp2), loc)
1891 end)
1884 | fname LPAREN sqlexp RPAREN (let 1892 | fname LPAREN sqlexp RPAREN (let
1885 val loc = s (fnameleft, RPARENright) 1893 val loc = s (fnameleft, RPARENright)
1886 1894
1887 val e = (EVar (["Basis"], "sql_ufunc", Infer), loc) 1895 val e = (EVar (["Basis"], "sql_ufunc", Infer), loc)
1888 val e = (EApp (e, fname), loc) 1896 val e = (EApp (e, fname), loc)