on master help sign in
create "foreign key" alias for constraint creation
commit6ea5f344787bdb95ec6ab737113b969a751807bc authorAgentM <agentm@themactionfaction.com> dateFri 12 Jun 2015, 16:03 (11 years ago) parenta318000
1 file changed+2−2
TutorialD/Interpreter/DatabaseExpr.hs+2−2
TutorialD/Interpreter/DatabaseExpr.hs+2−2
@@ -78,7 +78,7 @@ updateP = do
7878
7979constraintP :: Parser DatabaseExpr
8080constraintP = do
81− reservedOp "constraint"
81+ reservedOp "constraint" <|> reservedOp "foreign key"
8282 constraintName <- identifier
8383 subset <- relExprP
8484 reservedOp "in"
@@ -94,7 +94,7 @@ keyP = do
9494 uniquenessExpr <- relExprP
9595 let newIncDep = inclusionDependencyForKey uniquenessAttrNames uniquenessExpr
9696 return $ AddInclusionDependency (T.pack keyName) newIncDep
97−
97+
9898attributeAssignmentP :: Parser (String, Atom)
9999attributeAssignmentP = do
100100 attrName <- identifier