ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAtomQueryTransaction.php
Go to the documentation of this file.
1 <?php
2 require_once('./Services/Database/exceptions/exception.ilAtomQueryException.php');
3 require_once('./Services/Database/interfaces/interface.ilAtomQuery.php');
4 
13 {
14 
20  public function run()
21  {
22  $this->checkBeforeRun();
23  $this->runWithTransactions();
24  }
25 
26 
30  protected function runWithTransactions()
31  {
32  $i = 0;
33  do {
34  $e = null;
35  try {
36  $this->ilDBInstance->beginTransaction();
37  $this->runQueries();
38  $this->ilDBInstance->commit();
39  } catch (ilDatabaseException $e) {
40  $this->ilDBInstance->rollback();
41  if ($i >= self::ITERATIONS - 1) {
42  throw $e;
43  }
44  }
45  $i++;
46  } while ($e instanceof ilDatabaseException);
47  }
48 }
Class ilAtomQueryTransaction.
Class ilAtomQuery.
Class ilDatabaseException.
Interface ilAtomQuery.
$i
Definition: disco.tpl.php:19