ILIAS  release_8 Revision v8.24
class.ilAtomQueryTransaction.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
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}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$i
Definition: metadata.php:41