CurryInfo: ertools-3.0.0 / Database.ERD.Generic.requiredForeignDBKey

definition:
requiredForeignDBKey :: (Read t, Show t, Eq k, Show k) =>
                        String -> (Key -> t -> Dynamic) -> (Key -> t -> en)
                     -> (en -> k) -> k -> Transaction ()
requiredForeignDBKey ename entrypred info2entry keyf key =
  getDB (getAllEntities entrypred info2entry) |>>= \ens ->
  if null (filter (\e -> keyf e == key) ens)
   then doneT
   else errorT (TError KeyRequiredError
                       ("key: "++show key ++ " required in table: " ++ ename))
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
-- If a given key occurs in a (foreign key) attribute of an entity,
-- raise a transaction error.
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,_,_,_,_,_) |-> _}
name:
requiredForeignDBKey
precedence:
no precedence defined
result-values:
_
signature:
(Prelude.Read a, Prelude.Show a, Prelude.Eq c, Prelude.Show c) => String
-> (Prelude.Int -> a -> Database.KeyDatabaseSQLite.Dynamic) -> (Prelude.Int -> a
-> b) -> (b -> c) -> c -> Database.KeyDatabaseSQLite.Transaction ()
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term