ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAtomQueryTransaction.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
35 public function run(): void
36 {
37 $this->checkBeforeRun();
38 $this->runWithTransactions();
39 }
40
41
45 protected function runWithTransactions(): void
46 {
47 $i = 0;
48 do {
49 $e = null;
50 try {
51 $this->ilDBInstance->beginTransaction();
52 $this->runQueries();
53 $this->ilDBInstance->commit();
54 } catch (ilDatabaseException $e) {
55 $this->ilDBInstance->rollback();
56 if ($i >= self::ITERATIONS - 1) {
57 throw $e;
58 }
59 }
60 $i++;
61 } while ($e instanceof ilDatabaseException);
62 }
63}
Class ilAtomQuery Use ilAtomQuery to fire Database-Actions which have to be done without beeing influ...
Class ilAtomQueryTransaction.
Class ilDatabaseException.
Interface ilAtomQuery Use ilAtomQuery to fire Database-Actions which have to be done without beeing i...