final class LockRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\Server". Code outside that scope must not name this declaration.

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

$loweringLoweringThe lowering this rule belongs to
public function statement(Form $form): Statement

Lowers a lock statement: a node of lock or unlock.

Parameters

$formForm

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 6
public function lock(Node $lock): TableLock
public function unlock(Node $tables): UnlockTables

Private surface 2§

Implementation details, listed for orientation only.

private const MODES = ['lock_option: READ_SYM' => \SqlSemantics\Platform\MySql\Statement\Server\Lock\…
private Lowering $lowering

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Method calls 1