classExpressionMethod
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.
$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::RangeProperties§
public PartitionKind $kindpublic Scalar $expressionMethods§
public function __construct(public PartitionKind $kind, public Scalar $expression)Parameters
$kind | PartitionKind | RANGE or LIST |
$expression | Scalar | The partitioning expression |
public function deriveMethod(Derivation $derivation, Environment $scope): voidDerives the expression in the scope of the table.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 1
- method-call Derivation::scalar() line 43
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
ExpressionMethodTestcalls