classNativeFunctions
final class NativeFunctions
Looks up the native functions of a MySQL release: the functions a generic call name(...) reaches before a loadable or stored function.
Rule: MYSQL-NATIVE-FUNCTIONS-001. The server resolves an unqualified call of a name that is no keyword first against its native functions, then against loadable functions and then against stored functions of the default database; a qualified name db.name(...) is always a stored function. The names are compared without regard to letter case. A native function accepts a fixed range of argument counts; another count is the error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT. The catalogs (NativeCatalog, NativeSpatialCatalog, NativeInternalCatalog) list the names of every release with their argument counts and result codes. Terminates: one table lookup. Source: https://dev.mysql.com/doc/refman/8.4/en/function-resolution.html, https://github.com/mysql/mysql-server/blob/8.4/sql/item_create.cc. Status: Implemented.
Methods§
public function exists(GrammarRelease $release, string $name): boolTells whether a name is a native function of the release.
Parameters
$release | GrammarRelease | |
$name | string |
Returns
boolTest cases 1
Called from 1
Calls 1
- method-call NativeFunctions::rows() line 48
public function row(
GrammarRelease $release,
string $name,
int $arguments,
): array{int, int, string, bool}|nullAnswers the row that accepts the argument count, or null when the count is wrong.
Parameters
$release | GrammarRelease | |
$name | string | |
$arguments | int |
Returns
array{int, int, string, bool}|null The minimum and maximum argument count, the result code, and whether the function is reservedTest cases 1
Called from 1
Calls 1
- method-call NativeFunctions::rows() line 58
public function rows(GrammarRelease $release, string $name): list<array{int, int, string, bool}>Answers the rows of a name in a release.
Parameters
$release | GrammarRelease | |
$name | string |
Returns
list<array{int, int, string, bool}>Called from 2
Calls 6
- function-call
strtoupperline 74 - class-const NativeFunctions::BITS() line 75
- class-const NativeCatalog::ROWS() line 77
- class-const NativeSpatialCatalog::ROWS() line 77
- class-const NativeInternalCatalog::ROWS() line 77
- class-const NativeFunctions::RESERVED() line 79
Private surface 2§
Implementation details, listed for orientation only.
private const BITS = ['mysql-5.6.51' => 1, 'mysql-5.7.44' => 2, 'mysql-8.0.44' => 4, 'mysql-8.1.0' =…private const RESERVED = 512Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.