definition:
|
insertNewEntry :: EntityDescription a -> (a -> k -> a) -> (Int -> k) -> a
-> DBAction a
insertNewEntry endescr setkey keycons entity = do
insertEntry endescr entity
key <- getLastInsertedKey endescr
return $ setkey entity (keycons key)
|
demand:
|
no demanded arguments
|
deterministic:
|
deterministic operation
|
documentation:
|
--- Inserts a new entry of an entity and returns the new entry with the new key.
--- @param endescr - the EntityDescription describing the inserted entities
--- @param setkey - the operation to set the key of an entry
--- @param keycons - the constructor for entity keys
--- @param entity - the entity to be inserted
--- @return a DB result without a value if everything went right, or an
--- error if something went wrong
|
failfree:
|
<FAILING>
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_,_,_) |-> _}
|
name:
|
insertNewEntry
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
Database.CDBI.Description.EntityDescription a -> (a -> b -> a) -> (Prelude.Int
-> b) -> a -> Database.CDBI.Connection.DBAction a
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|