CurryInfo: spicey-4.2.0 / Spicey.GenerationHelper.manyToMany

definition: Info
 
manyToMany :: [Entity] -> Entity -> [(String,String)]
manyToMany entities forEntity =
  map (getOtherREnd forEntity)
      (filter (\ (Entity ename attr) -> isGenerated (Entity ename attr) &&
                                        isRelevantForEntity forEntity attr)
              entities)
 where
  getOtherREnd (Entity ename _)
               (Entity mmename [(Attribute _ (KeyDom name1) _ _),
                                (Attribute _ (KeyDom name2) _ _)]) =
    (if name1 == ename then name2 else name1, mmename)
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
Returns for a given entity the many-to-many related entity names
together with the relation name.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_) |-> {:,[]}}
name: Info
 manyToMany
precedence: Info
 no precedence defined
result-values: Info
 {:,[]}
signature: Info
 [Database.ERD.Entity] -> Database.ERD.Entity -> [(String, String)]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term