enum KeywordFunction: string
Public API: explicitly declared with @visibility public.

The built-in functions whose name is a keyword of the grammar and whose arguments are a plain list of expressions.

Each case holds the keyword the function is written with. The grammar names them in function_call_keyword, function_call_nonkeyword, function_call_conflict, geometry_function and grouping_operation. SUBSTR and MID are the keyword SUBSTRING, SCHEMA() is DATABASE(), SESSION_USER() and SYSTEM_USER() are USER() to the lexer; ADDDATE and SUBDATE here are the forms with a number of days. Source: https://dev.mysql.com/doc/refman/8.4/en/built-in-function-reference.html, https://dev.mysql.com/doc/refman/8.4/en/function-resolution.html.

Reading the keyword and the argument counts of a casedoctest
[\SqlSemantics\Platform\MySql\Statement\Call\KeywordFunction::Substring->value, \SqlSemantics\Platform\MySql\Statement\Call\KeywordFunction::Substring->arity()] // => ['SUBSTRING', [2, 3]]

Cases§

case CurrentUser = 'CURRENT_USER'
case Date = 'DATE'
case Day = 'DAY'
case Hour = 'HOUR'
case Insert = 'INSERT'
case Interval = 'INTERVAL'
case Left = 'LEFT'
case Minute = 'MINUTE'
case Month = 'MONTH'
case Right = 'RIGHT'
case Second = 'SECOND'
case Time = 'TIME'
case Timestamp = 'TIMESTAMP'
case Year = 'YEAR'
case User = 'USER'
case Ascii = 'ASCII'
case Charset = 'CHARSET'
case Coalesce = 'COALESCE'
case Collation = 'COLLATION'
case Database = 'DATABASE'
case If = 'IF'
case Format = 'FORMAT'
case Microsecond = 'MICROSECOND'
case Mod = 'MOD'
case OldPassword = 'OLD_PASSWORD'
case Password = 'PASSWORD'
case Quarter = 'QUARTER'
case Repeat = 'REPEAT'
case Replace = 'REPLACE'
case Reverse = 'REVERSE'
case RowCount = 'ROW_COUNT'
case Truncate = 'TRUNCATE'
case Week = 'WEEK'
case Contains = 'CONTAINS'
case GeometryCollection = 'GEOMETRYCOLLECTION'
case LineString = 'LINESTRING'
case MultiLineString = 'MULTILINESTRING'
case MultiPoint = 'MULTIPOINT'
case MultiPolygon = 'MULTIPOLYGON'
case Point = 'POINT'
case Polygon = 'POLYGON'
case AddDate = 'ADDDATE'
case SubDate = 'SUBDATE'
case Substring = 'SUBSTRING'
case Log = 'LOG'
case Grouping = 'GROUPING'

Methods§

public function arity(): array{int, int}

Answers the smallest and the largest number of arguments the grammar accepts; -1 is any number.

Returns

array{int, int}
Called from 1
Calls 46
public function result(): string

Answers the result code (MYSQL-CALL-RESULT-001) of the function; ADDDATE and SUBDATE are typed as date arithmetic.

Returns

string
Called from 1
Calls 46

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 6

Relations§

Method calls 2
Constant reads 68
Type declarations 3