definition: |
listController :: ControllerGenerator listController erdname (Entity entityName _) _ _ = controllerFunction ("Lists all " ++ entityName ++ " entities with buttons to show, delete,\n"++ "or edit an entity.") entityName "list" 0 controllerType [simpleRule [] -- no arguments (applyF (pre "$") [applyF checkAuthorizationFunc [applyF (enauthModName,lowerFirst entityName ++ "OperationAllowed") [applyF (authorizationModule,"ListEntities") []]], CLambda [CPVar infovar] $ doExpr [CSPat (CPVar entsvar) (applyF (model erdname,"runQ") [constF (model erdname,"queryAll" ++ entityName ++ "s")]), CSExpr (applyF (pre "return") [applyF (viewFunctionName entityName "list") [CVar infovar, CVar entsvar]]) ] ] )] where infovar = (0, "sinfo") entsvar = (1, lowerFirst entityName ++ "s") |
demand: |
argument 2 |
deterministic: |
deterministic operation |
documentation: |
------------------------------------------------------------------------------ |
failfree: |
(_, _, _, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{Entity},_,_) |-> _} |
name: |
listController |
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 |