classCallRules
final class CallRules
The entry rules of the call family: the methods other families and the statement dispatcher call.
Rule: MYSQL-CALL-ENTRY-001. Scope: function calls, aggregates, window functions and specifications, and JSON_TABLE columns. A function-like expression is handed to the rule of its production: FunctionRule (keyword functions, CHAR, TRIM, POSITION and calls written as name(...)), TemporalRule (clock functions and the temporal special syntaxes), WeightRule (WEIGHT_STRING), JsonRule (JSON_VALUE and the JSON_TABLE columns), AggregateRule (set functions) and WindowRule (window functions and windows). The unit productions function_call_conflict: geometry_function and the two alternatives of set_function_specification forward to their only child. The method names, parameters and return types are fixed by the family plan. Terminates: each method lowers a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/functions.html. Status: Implemented.
Properties§
public Lowering $loweringMethods§
public function __construct(public Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Calls 2
- new FrameRule line 46
- new WindowRule line 47
Lowers a function-like expression: a node of function_call_keyword, function_call_nonkeyword,
function_call_generic, function_call_conflict, sum_expr, set_function_specification or
window_func_call.
Parameters
$call | Node |
Returns
Throws
ImplementationGap When a production has no ruleTest cases 1
Called from 1
Calls 7
- method-call Lowering::form() line 59
- function-call
in_arrayline 60 - method-call CallRules::call() line 61
- method-call AggregateRule::aggregate() line 64
- new AggregateRule line 64
- method-call WindowRule::function() line 67
- method-call CallRules::function() line 70
Lowers a function call production of function_call_keyword, function_call_nonkeyword, function_call_conflict, geometry_function, grouping_operation or function_call_generic.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 2
Called from 1
Calls 12
- new FunctionRule line 81
- method-call FunctionRule::claims() line 82
- method-call FunctionRule::call() line 83
- new TemporalRule line 85
- method-call TemporalRule::claims() line 86
- method-call TemporalRule::call() line 87
- new WeightRule line 89
- method-call WeightRule::claims() line 90
- method-call WeightRule::call() line 91
- method-call JsonRule::value() line 94
- new JsonRule line 94
- static-call ImplementationGap::production() line 97
Lowers the current timestamp function of a column default or ON UPDATE clause: a node of now.
Parameters
$now | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Calls 2
- method-call TemporalRule::currentTimestamp() line 107
- new TemporalRule line 107
Lowers a window name: a node of window_name.
Parameters
$name | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Calls 1
- method-call WindowRule::name() line 117
public function windowSpecification(Node $specification): WindowSpecificationLowers a window specification: a node of window_spec.
Parameters
$specification | Node |
Returns
Throws
ImplementationGap When a production has no ruleTest cases 1
Calls 1
- method-call FrameRule::specification() line 127
public function jsonTableColumns(Node $columns): list<JsonTableColumn>Lowers the COLUMNS clause of JSON_TABLE: a node of columns_clause.
Parameters
$columns | Node |
Returns
list<JsonTableColumn>Throws
ImplementationGap When a production has no ruleTest cases 1
Calls 2
- method-call JsonRule::columns() line 138
- new JsonRule line 138
Private surface 2§
Implementation details, listed for orientation only.
private FrameRule $framesprivate WindowRule $windowsTest cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
CallRulesTest::testCallDispatchesEveryFamilyOfCallscallsCallRulesTest::testCurrentTimestampLowersNowcallsCallRulesTest::testFunctionLowersJsonValuecallsCallRulesTest::testFunctionReportsAProductionOutsideTheFamilycallsCallRulesTest::testJsonTableColumnsLowersTheColumnscallsCallRulesTest::testWindowNameLowersAWindowNamecallsCallRulesTest::testWindowSpecificationLowersASpecificationcalls