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

Derives the result type of the arithmetic and bit operators.

Rule: MYSQL-NUMERIC-RESULT-001. The operands are classified by MYSQL-NUMERIC-CONTEXT-001. For +, - and * the result is DOUBLE when an operand is double precision, otherwise DECIMAL when an operand is exact decimal, otherwise a BIGINT that is UNSIGNED when an operand is; an integer subtraction with an unsigned operand is signed under the session mode NO_UNSIGNED_SUBTRACTION and unsigned otherwise; the profile does not hold the mode, so its type is the known choice of the signed and the unsigned BIGINT. / yields DOUBLE when an operand is double precision and DECIMAL otherwise. DIV yields a BIGINT, UNSIGNED when an operand is. % follows + but its integer result takes the sign of the dividend. The bit operators and ~ yield BIGINT UNSIGNED; from MySQL 8.0 they yield VARBINARY when their operands (for the shifts and ~, the shifted operand) are binary strings other than hexadecimal, bit and NULL literals. Unary minus keeps DECIMAL and DOUBLE, makes an integer a signed BIGINT, and makes an integer literal beyond the negated BIGINT range a DECIMAL. Terminates: no recursion. Source: https://dev.mysql.com/doc/refman/8.4/en/arithmetic-functions.html, https://dev.mysql.com/doc/refman/8.4/en/bit-functions.html, https://dev.mysql.com/doc/refman/8.4/en/sql-mode.html#sqlmode_no_unsigned_subtraction. Status: Implemented.

Methods§

public function beyond(Scalar $operand): bool

Tells whether an operand is an integer literal whose negation lies below the BIGINT range.

Parameters

$operandScalar

Returns

bool
Test cases 1
Called from 1
Calls 3
public function integer(bool $unsigned): Integral

Test cases 8§

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

Dedicated tests 8

Relations§

Instantiated in 2
Method calls 3