final class IntegerContextRule
    implements RewriteRule

Completes source-defined integer contexts in sql_yacc.yy, including diagnostic decimal alternatives.

Methods§

public function __construct(private bool $strictYearWidth = true)

MySQL 5.6 and 5.7 normalize unsupported YEAR widths instead of rejecting them.

Parameters

$strictYearWidthbool
Test cases 34
public function rewrite(TerminalSequence $sequence): TerminalSequence

Keeps ordinary numeric expressions unchanged and constrains only the checked grammar positions.

Parameters

Test cases 37
Calls 6
public function weightStringLength(TerminalSequence $sequence): TerminalSequence

Gives WEIGHT_STRING its positive code-point count domain.

Parameters

Test cases 33
Called from 1
Calls 3
public function yearWidth(TerminalSequence $sequence): TerminalSequence

Keeps YEAR width checks independent of general integer and table-option domains.

Parameters

Test cases 33
Called from 1
Calls 4
public function options(TerminalSequence $sequence): TerminalSequence

Applies the independently bounded delay and statistics options in their owning productions.

Parameters

Test cases 34
Called from 1
Calls 5
public function mapped(
    TerminalSequence $sequence,
    int $production,
    string $terminal,
    string $source,
): TerminalSequence

Retains occurrence identity so a compatible explicit Plan spelling survives contextual renaming.

Parameters

$sequenceTerminalSequence
$productionint
$terminalstring
$sourcestring
Test cases 19
Called from 8
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private bool $strictYearWidth = true

Test cases 45§

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

Dedicated tests 39
Other tests reaching this symbol 6

Relations§

Instantiated in 1