CurryInfo: ertools-3.0.0 / Database.ERD.ToCDBI.entity2createTable

definition: Info
 
entity2createTable :: Entity -> String
entity2createTable (Entity name (a:atr)) = case a of
  Attribute "Key" _ _ _ ->
    "create table '" ++ name ++ "'(" ++
    foldl (\y x -> y ++ " ," ++ attr2colType x) (attr2colType a) atr ++
    ");"
  _ -> "create table '" ++ name ++ "'(" ++
       foldl (\y x -> y ++ " ," ++ relationship2colType x)
             (relationship2colType a)
             atr ++
       ", primary key (" ++ attr2combPrimaryKey (a:atr) ++ "));"
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
-------------------------------------------------------------------------
Generates the `CREATE TABLE` SQL command for a given entity.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({Entity}) |-> _}
name: Info
 entity2createTable
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 Database.ERD.Entity -> String
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 yes
totally-defined: Info
 possibly non-reducible on same data term