final class DefinitionRule
    implements RewriteRule

PT_part_definition requires one partition kind for the list; PT_partition checks its declared count.

Methods§

public function rewrite(TerminalSequence $sequence): TerminalSequence

Uses the explicit partition type, or the first definition for an ADD/REORGANIZE list.

Parameters

Test cases 16
Calls 9
public function declaredKind(
    TerminalSequence $sequence,
    ?int $clause,
): 'HASH'|'LIST'|'RANGE'|null

Returns the enclosing declaration's kind, leaving ALTER lists to infer it from their values.

Parameters

$sequenceTerminalSequence
$clause?int

Returns

'HASH'|'LIST'|'RANGE'|null
Test cases 21
Called from 1
Calls 3
public function inferCount(TerminalSequence $sequence, ?int $clause): TerminalSequence

Lets MySQL infer the count from the explicit list instead of checking an independent number.

Parameters

$sequenceTerminalSequence
$clause?int
Test cases 15
Called from 1
Calls 3
public function replaceValues(
    TerminalSequence $sequence,
    int $definition,
    int $values,
    'HASH'|'LIST'|'RANGE' $kind,
): TerminalSequence

Replaces incompatible values while preserving the definition and its occurrence identity.

Parameters

$sequenceTerminalSequence
$definitionint
$valuesint
$kind'HASH'|'LIST'|'RANGE'
Test cases 13
Called from 1
Calls 4

Test cases 31§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 25
Other tests reaching this symbol 6

Relations§

Instantiated in 1