ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilAtomQueryTransaction.php
Go to the documentation of this file.
1<?php
2require_once('./Services/Database/exceptions/exception.ilAtomQueryException.php');
3require_once('./Services/Database/interfaces/interface.ilAtomQuery.php');
4
13
19 public function run() {
20 $this->checkBeforeRun();
21 $this->runWithTransactions();
22 }
23
24
28 protected function runWithTransactions() {
29 $i = 0;
30 do {
31 $e = null;
32 try {
33 $this->ilDBInstance->beginTransaction();
34 $this->runQueries();
35 $this->ilDBInstance->commit();
36 } catch (ilDatabaseException $e) {
37 $this->ilDBInstance->rollback();
38 if ($i >= self::ITERATIONS - 1) {
39 throw $e;
40 }
41 }
42 $i ++;
43 } while ($e instanceof ilDatabaseException);
44 }
45}
An exception for terminatinating execution or to throw for unit testing.
Class ilAtomQuery.
Class ilAtomQueryTransaction.
Class ilDatabaseException.
Interface ilAtomQuery.