classTemporalMerge
final class TemporalMerge
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.
Merges two types of which at least one is temporal and neither is a string.
Rule: MYSQL-TEMPORAL-MERGE-001, a part of MYSQL-TYPE-AGGREGATION-001. Two values of one temporal kind keep it; DATE, TIME, TIMESTAMP and DATETIME merge with each other to DATETIME, except that TIMESTAMP with TIMESTAMP stays TIMESTAMP; YEAR with an integer is that integer; every other mixture is VARCHAR. Terminates: no recursion. Source: https://dev.mysql.com/doc/refman/8.4/en/union.html, https://dev.mysql.com/doc/refman/8.4/en/date-and-time-type-conversion.html. Status: Implemented.
Methods§
public function merge(TypeDescriptor $left, TypeDescriptor $right): TypeDescriptorAnswers the common type of two types.
Parameters
$left | TypeDescriptor | |
$right | TypeDescriptor |
Returns
Test cases 1
Called from 1
Calls 5
- new Temporal line 37
- class-const TemporalKind::Year() line 40
- new Character line 40
- class-const CharacterKind::VarChar() line 40
- class-const TemporalKind::DateTime() line 40
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.