definition: |
deleteTransaction :: ControllerGenerator deleteTransaction erdname (Entity entityName attrs) _ allEntities = let manyToManyEntities = manyToMany allEntities (Entity entityName attrs) entlc = lowerFirst entityName -- entity name in lowercase entvar = (0, entlc) -- entity parameter for trans. in stCmtFunc ("Transaction to delete a given " ++ entityName ++ " entity.") (transFunctionName entityName "delete") 1 Private (baseType (model erdname, entityName) ~> applyTC (dbconn "DBAction") [unitType]) [simpleRule [CPVar entvar] -- entity parameter for controller (doExpr $ concatMap (\ (ename,erel) -> [CSPat (CPVar(0, "old" ++ erel ++ ename ++ "s")) (applyF (controllerModuleName entityName, "get" ++ erel ++ entityName ++ ename ++ "s") [CVar entvar]), CSExpr (applyF (controllerModuleName entityName, "remove" ++ erel) [cvar ("old" ++ erel ++ ename ++ "s"), CVar entvar ])] ) manyToManyEntities ++ [CSExpr $ applyF (model erdname, "delete" ++ entityName) [CVar entvar]])] |
demand: |
argument 2 |
deterministic: |
deterministic operation |
documentation: |
--- Generates a transaction to delete an entity. |
failfree: |
<FAILING> |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{Entity},_,_) |-> _} |
name: |
deleteTransaction |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
String -> Database.ERD.Entity -> [Database.ERD.Relationship] -> [Database.ERD.Entity] -> AbstractCurry.Types.CFuncDecl |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |