final class ExpressionMethod
    implements PartitionMethod
    uses Snapshot
Public API: explicitly declared with @visibility public.

RANGE (expression) or LIST (expression): partitioning by the value of an expression compared with the partition values.

Mirrors PT_part_type_def_range_expr and PT_part_type_def_list_expr. The expression is derived in the scope of the partitioned table. Source: https://dev.mysql.com/doc/refman/8.4/en/partitioning-range.html, https://dev.mysql.com/doc/refman/8.4/en/partitioning-list.html.

Holding a range partitioning by an expressiondoctest
$method = new \SqlSemantics\Platform\MySql\Statement\Partition\Method\ExpressionMethod(\SqlSemantics\Platform\MySql\Statement\Partition\Method\PartitionKind::Range, new \SqlSemantics\Platform\MySql\Statement\Name\ColumnUse(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('id')));
    $method->kind // => \SqlSemantics\Platform\MySql\Statement\Partition\Method\PartitionKind::Range

Properties§

public Scalar $expression

Methods§

public function __construct(public PartitionKind $kind, public Scalar $expression)

Parameters

$kindPartitionKindRANGE or LIST
$expressionScalarThe partitioning expression
public function deriveMethod(Derivation $derivation, Environment $scope): void

Derives the expression in the scope of the table.

Parameters

$derivationDerivation
$scopeEnvironment
Calls 1
public function render(Output $out): void

Writes the method.

Parameters

$outOutput
Calls 1

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