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

Derives the result type of date arithmetic with an interval.

Rule: MYSQL-TEMPORAL-RESULT-001. The result is a DATE when the operand is a DATE and the unit has date parts only (YEAR, QUARTER, MONTH, WEEK, DAY, YEAR_MONTH); a DATETIME when the operand is a DATETIME or TIMESTAMP, a DATE with a unit that has time parts, or a TIME with a unit that has date parts; from MySQL 8.0.28 a TIME when the operand is a TIME and the unit has time parts only, which earlier releases return as a string; and a string (VARCHAR) for every other operand, including a bare NULL. A missing or invalid operand type decides the result (MYSQL-TYPE-ALTERNATIVES-001). Terminates: no recursion. Source: https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_date-add, https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-add. Status: Implemented.

Methods§

Private surface 2§

Implementation details, listed for orientation only.

private const DATE_UNITS = [\SqlSemantics\Platform\MySql\Statement\Expression\IntervalUnit::Year, \SqlSema…
private const TIME_UNITS = [\SqlSemantics\Platform\MySql\Statement\Expression\IntervalUnit::Microsecond, \…

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 2
Method calls 2