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

definition:
maxTestInsert :: (Read t, Show t, Eq a, Show a) =>
                 String -> (Key -> t -> Dynamic) -> (Key -> t -> en)
              -> (en -> a) -> Int -> a -> Transaction ()
maxTestInsert ename entrypred info2entry selector maxrange attr =
  getDB (getAllEntities entrypred info2entry) |>>= \es ->
  if length (filter (\e -> selector e == attr) es) < maxrange
   then doneT
   else errorT (TError MaxError ("maximum reached for attribute " 
                                 ++show attr++" in entity "++ename))
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
-- Maximum test before inserting a relationship with a given key:
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,_,_,_,_,_,_) |-> _}
name:
maxTestInsert
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) -> Prelude.Int -> 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