classReorder
final class Reorder
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.ORDER BY column [ASC | DESC], …: a request to store the rows in an order once, when the table is rebuilt.
Mirrors PT_alter_table_order. Each item names a column of the table (the grammar admits only column names) and is resolved in the scope of the changed table. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html#alter-table-order-by.
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t ORDER BY a DESC');
$alter->toString() // => 'ALTER TABLE t ORDER BY a DESC'Properties§
public list<OrderItem> $itemsMethods§
public function __construct(list<OrderItem> $items)Parameters
$items | list<OrderItem> | The ordering columns in order; at least one |
Calls 3
- static-call Check::input() line 43
- static-call Check::listOf() line 44
- class-const OrderItem::class() line 44
public function deriveCommand(Derivation $derivation, Environment $scope): voidResolves the ordering columns in the scope of the table.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 1
- method-call Derivation::scalar() line 56
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
ReorderTestcalls