ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestProcessLockerDb Class Reference
+ Inheritance diagram for ilTestProcessLockerDb:
+ Collaboration diagram for ilTestProcessLockerDb:

Public Member Functions

 __construct (ilDBInterface $db)
 
- Public Member Functions inherited from ilTestProcessLocker
 executeTestStartLockOperation (callable $operation)
 
 executeRandomPassBuildOperation (callable $operation, $withTaxonomyTables=false)
 
 executeTestFinishOperation (callable $operation)
 
 executeNamedOperation (string $operationDescriptor, callable $operation)
 

Protected Member Functions

 onBeforeExecutingTestStartOperation ()
 {} More...
 
 onBeforeExecutingRandomPassBuildOperation ($withTaxonomyTables=false)
 {} More...
 
 onBeforeExecutingTestFinishOperation ()
 {} More...
 
 executeOperation (callable $operation)
 {} More...
 
 onBeforeExecutingNamedOperation (string $operationDescriptor)
 
 onAfterExecutingNamedOperation (string $operationDescriptor)
 
- Protected Member Functions inherited from ilTestProcessLocker
 executeOperation (callable $operation)
 
 onBeforeExecutingTestStartOperation ()
 
 onAfterExecutingTestStartOperation ()
 
 onBeforeExecutingRandomPassBuildOperation ($withTaxonomyTables=false)
 
 onAfterExecutingRandomPassBuildOperation ($withTaxonomyTables=false)
 
 onBeforeExecutingTestFinishOperation ()
 
 onAfterExecutingTestFinishOperation ()
 
 onBeforeExecutingNamedOperation (string $operationDescriptor)
 
 onAfterExecutingNamedOperation (string $operationDescriptor)
 

Protected Attributes

 $db
 
 $atom_query
 

Detailed Description

Definition at line 27 of file class.ilTestProcessLockerDb.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestProcessLockerDb::__construct ( ilDBInterface  $db)
Parameters
ilDBInterface$db

Definition at line 42 of file class.ilTestProcessLockerDb.php.

References $db.

43  {
44  $this->db = $db;
45  $this->atom_query = $this->db->buildAtomQuery();
46  }

Member Function Documentation

◆ executeOperation()

ilTestProcessLockerDb::executeOperation ( callable  $operation)
protected

{}

Definition at line 87 of file class.ilTestProcessLockerDb.php.

References $ilDB.

88  {
89  $this->atom_query ->addQueryCallable(function (ilDBInterface $ilDB) use ($operation) {
90  $operation();
91  });
92  $this->atom_query->run();
93  }

◆ onAfterExecutingNamedOperation()

ilTestProcessLockerDb::onAfterExecutingNamedOperation ( string  $operationDescriptor)
protected

Definition at line 100 of file class.ilTestProcessLockerDb.php.

100  : void
101  {
102  throw new RuntimeException('Operation not supported');
103  }

◆ onBeforeExecutingNamedOperation()

ilTestProcessLockerDb::onBeforeExecutingNamedOperation ( string  $operationDescriptor)
protected

Definition at line 95 of file class.ilTestProcessLockerDb.php.

95  : void
96  {
97  throw new RuntimeException('Operation not supported');
98  }

◆ onBeforeExecutingRandomPassBuildOperation()

ilTestProcessLockerDb::onBeforeExecutingRandomPassBuildOperation (   $withTaxonomyTables = false)
protected

{}

Definition at line 59 of file class.ilTestProcessLockerDb.php.

60  {
61  $this->atom_query->addTableLock('tst_rnd_cpy');
62  $this->atom_query->addTableLock('qpl_questions');
63  $this->atom_query->addTableLock('qpl_qst_type');
64  $this->atom_query->addTableLock('tst_test_rnd_qst')->lockSequence(true);
65  $this->atom_query->addTableLock('il_plugin');
66  $this->atom_query->addTableLock('tst_active');
67 
68  if ($withTaxonomyTables) {
69  $this->atom_query->addTableLock('tax_tree')->aliasName('s');
70  $this->atom_query->addTableLock('tax_tree')->aliasName('t');
71  $this->atom_query->addTableLock('tax_node_assignment');
72  }
73  }

◆ onBeforeExecutingTestFinishOperation()

ilTestProcessLockerDb::onBeforeExecutingTestFinishOperation ( )
protected

{}

Definition at line 78 of file class.ilTestProcessLockerDb.php.

79  {
80  $this->atom_query->addTableLock('tst_active');
81  $this->atom_query->addTableLock('tst_pass_result');
82  }

◆ onBeforeExecutingTestStartOperation()

ilTestProcessLockerDb::onBeforeExecutingTestStartOperation ( )
protected

{}

Definition at line 51 of file class.ilTestProcessLockerDb.php.

52  {
53  $this->atom_query->addTableLock('tst_active');
54  }

Field Documentation

◆ $atom_query

ilTestProcessLockerDb::$atom_query
protected

Definition at line 37 of file class.ilTestProcessLockerDb.php.

◆ $db

ilTestProcessLockerDb::$db
protected

Definition at line 32 of file class.ilTestProcessLockerDb.php.

Referenced by __construct().


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