ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAtomQueryTransaction Class Reference

Class ilAtomQueryTransaction. More...

+ Inheritance diagram for ilAtomQueryTransaction:
+ Collaboration diagram for ilAtomQueryTransaction:

Public Member Functions

 run ()
 Fire your Queries. More...
 
- Public Member Functions inherited from ilAtomQueryBase
 __construct (ilDBInterface $ilDBInstance, $isolation_level=ilAtomQuery::ISOLATION_SERIALIZABLE)
 ilAtomQuery constructor. More...
 
 getRisks ()
 
 addTableLock ($table_name)
 Add table-names which are influenced by your queries, MyISAm has to lock those tables. More...
 
 addQueryCallable (callable $query)
 All action on the database during this isolation has to be passed as Callable to ilAtomQuery. More...
 
 replaceQueryCallable (callable $query)
 
 run ()
 Fire your Queries. More...
 
 getIsolationLevel ()
 
 checkCallable (callable $query)
 

Protected Member Functions

 runWithTransactions ()
 
- Protected Member Functions inherited from ilAtomQueryBase
 getDeterminedLockLevel ()
 
 checkQueries ()
 
 runQueries ()
 
 checkBeforeRun ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAtomQueryBase
static isThereRiskThat ($isolation_level, $anomaly)
 
static getPossibleAnomalies ($isolation_level)
 
static checkIsolationLevel ($isolation_level)
 
static checkAnomaly ($anomalie)
 
- Data Fields inherited from ilAtomQueryBase
const ITERATIONS = 10
 
- Data Fields inherited from ilAtomQuery
const LOCK_WRITE = 1
 
const LOCK_READ = 2
 
const ISOLATION_READ_UNCOMMITED = 1
 
const ISOLATION_READ_COMMITED = 2
 
const ISOLATION_REPEATED_READ = 3
 
const ISOLATION_SERIALIZABLE = 4
 
const ANO_LOST_UPDATES = 1
 
const ANO_DIRTY_READ = 2
 
const ANO_NON_REPEATED_READ = 3
 
const ANO_PHANTOM = 4
 
- Protected Attributes inherited from ilAtomQueryBase
 $isolation_level = ilAtomQuery::ISOLATION_SERIALIZABLE
 
 $tables = array()
 
 $query = null
 
 $ilDBInstance
 
- Static Protected Attributes inherited from ilAtomQueryBase
static $available_isolations_levels
 
static $possible_anomalies
 
static $anomalies_map
 

Detailed Description

Class ilAtomQueryTransaction.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
    Implements Atom-Queries with Transactions, currently used in ilDbPdoGalery

Definition at line 12 of file class.ilAtomQueryTransaction.php.

Member Function Documentation

◆ run()

ilAtomQueryTransaction::run ( )

Fire your Queries.

Exceptions

Implements ilAtomQuery.

Definition at line 20 of file class.ilAtomQueryTransaction.php.

References ilAtomQueryBase\checkBeforeRun(), and runWithTransactions().

+ Here is the call graph for this function:

◆ runWithTransactions()

ilAtomQueryTransaction::runWithTransactions ( )
protected
Exceptions

Definition at line 30 of file class.ilAtomQueryTransaction.php.

References $i, and ilAtomQueryBase\runQueries().

Referenced by run().

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  }
Class ilDatabaseException.
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: