comparison src/urweb.grm @ 714:0f42461273cf

CHECK constraints
author Adam Chlipala <adamc@hcoop.net>
date Thu, 09 Apr 2009 15:30:15 -0400
parents 915ec60592d4
children e28637743279
comparison
equal deleted inserted replaced
713:baaae037e7f6 714:0f42461273cf
208 | COUNT | AVG | SUM | MIN | MAX 208 | COUNT | AVG | SUM | MIN | MAX
209 | ASC | DESC 209 | ASC | DESC
210 | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS 210 | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS
211 | CURRENT_TIMESTAMP 211 | CURRENT_TIMESTAMP
212 | NE | LT | LE | GT | GE 212 | NE | LT | LE | GT | GE
213 | CCONSTRAINT | UNIQUE | PRIMARY | FOREIGN | KEY | ON | NO | ACTION | RESTRICT | CASCADE | REFERENCES 213 | CCONSTRAINT | UNIQUE | CHECK | PRIMARY | FOREIGN | KEY | ON | NO | ACTION | RESTRICT | CASCADE | REFERENCES
214 214
215 %nonterm 215 %nonterm
216 file of decl list 216 file of decl list
217 | decls of decl list 217 | decls of decl list
218 | decl of decl list 218 | decl of decl list
507 val e = (ECApp (e, #1 (#1 tnames)), loc) 507 val e = (ECApp (e, #1 (#1 tnames)), loc)
508 val e = (ECApp (e, (CRecord (#2 tnames), loc)), loc) 508 val e = (ECApp (e, (CRecord (#2 tnames), loc)), loc)
509 val e = (EDisjointApp e, loc) 509 val e = (EDisjointApp e, loc)
510 in 510 in
511 (EDisjointApp e, loc) 511 (EDisjointApp e, loc)
512 end)
513
514 | CHECK sqlexp (let
515 val loc = s (CHECKleft, sqlexpright)
516 in
517 (EApp ((EVar (["Basis"], "check", Infer), loc),
518 sqlexp), loc)
512 end) 519 end)
513 520
514 | FOREIGN KEY tnames REFERENCES texp LPAREN tnames' RPAREN pmodes 521 | FOREIGN KEY tnames REFERENCES texp LPAREN tnames' RPAREN pmodes
515 (let 522 (let
516 val loc = s (FOREIGNleft, pmodesright) 523 val loc = s (FOREIGNleft, pmodesright)