Skip to content

Commit

Permalink
Update src/SqlAst/IfNullReturnTypeExtension.php
Browse files Browse the repository at this point in the history
Add reference link to MySQL docs

Co-authored-by: Markus Staab <[email protected]>
  • Loading branch information
hemberger and staabm committed Apr 9, 2023
1 parent 1f73daf commit 53e059c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SqlAst/IfNullReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function getReturnType(FunctionCall $expression, QueryScope $scope): ?Typ

// The result type is always the "more general" of the two args
// in the order: string, float, integer.
// see https://dev.mysql.com/doc/refman/5.7/en/flow-control-functions.html#function_ifnull
if ($this->isResultString($argType1NoNull, $argType2NoNull)) {
$resultType = $resultType->toString();
} elseif ($this->isResultFloat($argType1NoNull, $argType2NoNull)) {
Expand Down

0 comments on commit 53e059c

Please sign in to comment.