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

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): bool

Tells whether a name is a native function of the release.

Parameters

$releaseGrammarRelease
$namestring

Returns

bool
Test cases 1
Called from 1
Calls 1
public function row(
    GrammarRelease $release,
    string $name,
    int $arguments,
): array{int, int, string, bool}|null

Answers the row that accepts the argument count, or null when the count is wrong.

Parameters

$releaseGrammarRelease
$namestring
$argumentsint

Returns

array{int, int, string, bool}|null The minimum and maximum argument count, the result code, and whether the function is reserved
Test cases 1
Called from 1
Calls 1

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 = 512

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