classLockOption
final class LockOption
implements AlterOption, AlterModifier
uses Snapshot
Public API: explicitly declared with
@visibility public.LOCK [=] DEFAULT | name: how much concurrent access a table change must allow.
The grammar reads the lock level as an identifier; the server accepts NONE, SHARED and EXCLUSIVE, and the word DEFAULT spelled as an identifier in 5.6 and 5.7, compared without regard to case. Any other name is the diagnostic UnknownAlterChoice (MYSQL-ALTER-CHOICES-001). The name is kept as written; the keyword DEFAULT is the absent name. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html#alter-table-performance.
(new \SqlSemantics\Platform\MySql\Statement\Alter\Modifier\LockOption(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('NONE')))->lock?->value // => 'NONE'Properties§
public Name|null $lockMethods§
public function __construct(public Name|null $lock)Parameters
$lock | Name|null | The lock level, or null for the keyword DEFAULT |
public function deriveOption(Derivation $derivation): voidReports a lock level the server of the release does not know.
Parameters
$derivation | Derivation |
Called from 1
Calls 2
- method-call Choices::lock() line 46
- new Choices line 46
public function deriveCommand(Derivation $derivation, Environment $scope): voidDerives the option as an action of ALTER TABLE.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 1
- method-call LockOption::deriveOption() line 54
public function render(Output $out): voidWrites the option.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 62
- method-call Output::name() line 66
- class-const NameUse::Label() line 66
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
LockOptionTestcalls