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

A size in bytes: a plain number, or a word such as 16M that the lexer reads as an identifier.

A number followed at once by a letter is one identifier token; the server reads the letters K, M and G as multipliers and rejects any other word. The word is kept as written. Source: https://dev.mysql.com/doc/refman/8.4/en/create-tablespace.html.

Holding a size written with a multiplierdoctest
(new \SqlSemantics\Platform\MySql\Statement\Literal\ByteSize(null, new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('16M')))->word?->value // => '16M'

Properties§

public Numeral|null $number
public Name|null $word = null

Methods§

public function __construct(public Numeral|null $number, public Name|null $word = null)

Parameters

$numberNumeral|nullThe size written as a number
$wordName|nullThe size written as a word; exactly one of the two is given
Calls 1
public function render(Output $out): void

Writes the number or the word.

Parameters

$outOutput
Test cases 2
Calls 3

Test cases 6§

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

Dedicated tests 4
Other tests reaching this symbol 2

Relations§

Instantiated in 2
Type declarations 5