CurryInfo: cdbi-3.2.0 / Database.CDBI.ER.restoreEntries

definition:
 
restoreEntries :: EntityDescription a -> [a] -> DBAction ()
restoreEntries en xs =
  let query = ("insert into '" ++ (getTable en) ++
               "' values("++ (questionmarks en) ++");")
  in executeMultipleTimes query (map (getToValues en) xs)
demand:
 no demanded arguments
deterministic:
 deterministic operation
documentation:
 
Stores entries with their current keys in the database.
It is an error if entries with the same key are already in the database.
Thus, this operation is useful only to restore a database with saved data.
@param en - The EntityDescription that describes the entities to be saved
@param xs - The list of entries to stored
@return A Result without parameter if saving worked or an Error if there
was a problem. If one saving operation reports an error, every following
saving operation will be aborted but every saving operation up to that
point will be executed. If these executed saving operations should also
be discarded withTransaction or begin/commit/rollback should be used
failfree:
 <FAILING>
indeterministic:
 referentially transparent operation
infix:
 no fixity defined
iotype:
 {(_,_) |-> _}
name:
 restoreEntries
precedence:
 no precedence defined
result-values:
 _
signature:
 Database.CDBI.Description.EntityDescription a -> [a]
-> Database.CDBI.Connection.DBAction ()
solution-complete:
 operation might suspend on free variables
terminating:
 possibly non-terminating
totally-defined:
 possibly non-reducible on same data term