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

definition: Info
 
unique2 :: (Eq a, Eq b, Read a, Read b, Show a, Show b) =>
           (Key -> (a,b) -> Dynamic) -> a -> b -> Transaction ()
unique2 entrypred k1 k2 =
  getDB (allDBInfos entrypred) |>>= \is ->
  if null (filter (== (k1,k2)) is)
   then doneT
   else errorT (TError UniqueError "relationship already exists")
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
Uniqueness of a combination of two attributes.
Check whether this combination already exists.
If it exists, a transaction error is generated, otherwise everything is ok.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,_,_,_,_,_,_,_) |-> _}
name: Info
 unique2
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 (Prelude.Eq a, Prelude.Eq b, Prelude.Read a, Prelude.Read b, Prelude.Show a, Prelude.Show b) => (Prelude.Int
-> (a, b) -> Database.KeyDatabaseSQLite.Dynamic) -> a -> b
-> Database.KeyDatabaseSQLite.Transaction ()
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term