CurryInfo: spicey-4.2.0 / Spicey.ControllerGeneration.getAll

definition: Info
 
getAll :: String -> Entity -> [String] -> [Entity] -> [CFuncDecl]
getAll erdname (Entity entityName _) entities _ =
    map getAllFunction entities
  where
    getAllFunction :: String -> CFuncDecl
    getAllFunction foreignEntity =
      stCmtFunc 
      ("Gets all " ++ foreignEntity ++ " entities.")
      (controllerModuleName entityName, "getAll" ++ foreignEntity ++ "s")
      0
      Private
      (ioType (listType (ctvar foreignEntity)))
      [simpleRule []
        (applyF (model erdname,"runQ")
          [applyF (model erdname,"queryAll")
            [CLambda [CPVar(0, take 1 (lowerFirst foreignEntity) )]
                     (CLetDecl [(CLocalVars [(1,"key")])]
                        (applyF (model erdname, lowerFirst foreignEntity)
                                [cvar "key",
                                 cvar (take 1 (lowerFirst foreignEntity))]))
                    ]
            ]
       )
      ]
demand: Info
 arguments 2 3
deterministic: Info
 deterministic operation
failfree: Info
 (_, _, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,{Entity},_,_) |-> {:,[]}}
name: Info
 getAll
precedence: Info
 no precedence defined
result-values: Info
 {:,[]}
signature: Info
 String -> Database.ERD.Entity -> [String] -> [Database.ERD.Entity]
-> [AbstractCurry.Types.CFuncDecl]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term