final class NumericMerge
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Merges two numeric types.

Rule: MYSQL-NUMERIC-MERGE-001, a part of MYSQL-TYPE-AGGREGATION-001. BOOL is TINYINT, SERIAL and BIT are BIGINT UNSIGNED. Two integers merge to the wider kind, unsigned when both are; an unsigned and a signed integer need the next wider signed kind, and BIGINT with BIGINT UNSIGNED needs DECIMAL. An integer with DECIMAL gives DECIMAL. Two FLOATs stay FLOAT; any other mixture with FLOAT, DOUBLE or REAL gives DOUBLE. Terminates: no recursion. Source: https://dev.mysql.com/doc/refman/8.4/en/union.html, https://dev.mysql.com/doc/refman/8.4/en/numeric-type-syntax.html. Status: Implemented.

Methods§

Private surface 2§

Implementation details, listed for orientation only.

private const WIDTHS = ['TINYINT' => 1, 'SMALLINT' => 2, 'MEDIUMINT' => 3, 'INT' => 4, 'BIGINT' => 5]
private const KINDS = [1 => \SqlSemantics\Platform\MySql\Statement\Type\Kind\IntegralKind::TinyInt, 2…

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 1
Method calls 1