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

One collation level of the LEVEL clause of WEIGHT_STRING in MySQL 5.6 and 5.7, with its order and reversal flags.

Source: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_weight-string.

Holding a descending, reversed leveldoctest
$level = new \SqlSemantics\Platform\MySql\Statement\Call\Weight\WeightLevel(new \SqlSemantics\Platform\MySql\Statement\Literal\Numeral('2'), \SqlSemantics\Platform\MySql\Statement\Query\Direction::Descending, true);
    [$level->number->text, $level->direction, $level->reverse] // => ['2', \SqlSemantics\Platform\MySql\Statement\Query\Direction::Descending, true]

Properties§

public Numeral $number
public Direction|null $direction = null
public bool $reverse = false

Methods§

public function __construct(
    public Numeral $number,
    public Direction|null $direction = null,
    public bool $reverse = false,
)

Parameters

$numberNumeralThe level
$directionDirection|nullThe written ASC or DESC
$reverseboolWhether REVERSE is written
public function render(Output $out): void

Writes the level and its flags.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Constant reads 1
Type declarations 1