classSetTableOptions
final class SetTableOptions
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.Table options written one after the other without commas, such as ENGINE = InnoDB COMMENT = 'x'.
The server adds each option of the run to the action list of ALTER TABLE (PT_create_table_option); options separated by commas are separate runs. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html#alter-table-options.
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("ALTER TABLE t ENGINE = InnoDB COMMENT = 'x'");
count($alter->statement->commands[0]->options) // => 2Properties§
public list<TableOption> $optionsMethods§
public function __construct(list<TableOption> $options)Parameters
$options | list<TableOption> | The options in order; at least one |
Calls 3
- static-call Check::input() line 42
- static-call Check::listOf() line 43
- class-const TableOption::class() line 43
public function deriveCommand(Derivation $derivation, Environment $scope): voidDerives the options.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 2
- method-call ElementFacts::options() line 51
- new ElementFacts line 51
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
SetTableOptionsTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\TableChange\Alter\AlterRule::items() packages/sql-semantics-mysql/src/Lowering/TableChange/Alter/AlterRule.php:172
- new SqlSemantics\Platform\MySql\Lowering\TableChange\Alter\ItemRule::simple() packages/sql-semantics-mysql/src/Lowering/TableChange/Alter/ItemRule.php:134