CurryInfo: cdbi-3.2.0 / Database.CDBI.ER.addDescription

definition:
addDescription :: EntityDescription a ->
                  Int ->
                  (a -> b -> b) ->
                  (b -> a) ->
                  CombinedDescription b ->
                  CombinedDescription b
addDescription ed1 rename f1 f2 (CD xs f1' f2' f3') =
  CD ((getTable ed1, rename, getTypes ed1) : xs)
     createFunction1
     createFunction2
     createFunction3
    where createFunction1 ys =
            f1 ((getToEntity ed1)
               (take lengthEd1 ys))
               (f1' (drop lengthEd1 ys))
            where lengthEd1 = length (getTypes ed1)
          createFunction2 combEnt =
            [(getToValues ed1) (f2 combEnt)] ++ (f2' combEnt)
          createFunction3 combEnt =
            [(getToInsertValues ed1) (f2 combEnt)] ++ (f3' combEnt)
demand:
argument 5
deterministic:
deterministic operation
documentation:
--- Adds another ED to an already existing CD.
--- @param ed1 - The ED to be added
--- @param rename - The "rename-number"
--- @param f1 - A function that describes how the combined entity is built.
--- Takes the entity that should be added and the combined entity as parameter
--- and combines those into a new version of the combined entity.
--- @param cd - The already existing CD
failfree:
(_, _, _, _, _)
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,{CD}) |-> {CD}}
name:
addDescription
precedence:
no precedence defined
result-values:
{CD}
signature:
EntityDescription a -> Prelude.Int -> (a -> b -> b) -> (b -> a)
-> CombinedDescription b -> CombinedDescription b
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
reducible on all ground data terms