classLockRule
final class LockRule
Lowers LOCK TABLES, UNLOCK TABLES and the backup lock statements.
Rule: MYSQL-LOCK-001. Scope: lock, unlock, table_lock_list, table_lock, lock_option. TABLE and TABLES are synonyms (LeafNoise); the alias goes through the query family's alias rule. Constructs: LockTables, TableLock, UnlockTables, LockInstance, UnlockInstance. Terminates: the lock list is flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/lock-tables.html, https://dev.mysql.com/doc/refman/8.4/en/lock-instance-for-backup.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a lock statement: a node of lock or unlock.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 6
- method-call LockRule::tables() line 59
- new LockInstance line 60
- method-call LockRule::unlock() line 61
- method-call Form::node() line 61
- new UnlockInstance line 62
- static-call ImplementationGap::production() line 63
public function tables(Form $form): LockTablesLowers LOCK TABLES.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 6
- method-call Form::node() line 74
- method-call Lowering::form() line 76
- method-call Lists::items() line 78
- new Lists line 78
- method-call LockRule::lock() line 79
- new LockTables line 82
Lowers one locked table: a node of table_lock.
Parameters
$lock | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 4
- method-call Lowering::form() line 92
- static-call ImplementationGap::production() line 94
- new TableLock line 98
- class-const LockRule::MODES() line 101
public function unlock(Node $tables): UnlockTablesLowers UNLOCK TABLES.
Parameters
$tables | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 1
- new UnlockTables line 115
Private surface 2§
Implementation details, listed for orientation only.
private const MODES = ['lock_option: READ_SYM' => \SqlSemantics\Platform\MySql\Statement\Server\Lock\…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
LockRuleTestcalls