final class PartitionOption
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One option of a partition or subpartition definition, such as ENGINE = InnoDB or COMMENT = 'text'.

Mirrors the PT_partition_option classes. Exactly one of the name, the number and the text is present, as the kind requires. The = and the STORAGE before ENGINE are optional words. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html#create-table-partitioning.

Holding a partition commentdoctest
$option = new \SqlSemantics\Platform\MySql\Statement\Partition\PartitionOption(\SqlSemantics\Platform\MySql\Statement\Partition\PartitionOptionKind::Comment, text: new \SqlSemantics\Platform\MySql\Statement\Literal\Text('old rows'));
    $option->text?->value // => 'old rows'

Properties§

public Name|null $name = null
public Numeral|null $number = null
public Text|null $text = null

Methods§

public function __construct(
    public PartitionOptionKind $kind,
    public Name|null $name = null,
    public Numeral|null $number = null,
    public Text|null $text = null,
)

Parameters

$kindPartitionOptionKindThe option
$nameName|nullThe tablespace or engine name
$numberNumeral|nullThe node group or row count
$textText|nullThe directory or comment
Calls 3
public function render(Output $out): void

Writes the option.

Parameters

$outOutput
Calls 5

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 3
Constant reads 2
Type declarations 1