classCallChecks
final class CallChecks
Reports the clauses of a call that the kind of the called built-in function does not take.
Rule: SQLITE-CALL-CLAUSE-001. A window-only function must be called with OVER; a scalar function may not be called with OVER, FILTER or an argument ordering; a call with OVER takes no DISTINCT and no argument ordering; a window-only function takes no FILTER; a DISTINCT aggregate takes exactly one argument. The kind comes from SQLITE-FUNCTION-RESULT-001 for the written number of arguments; a name outside the table or a wrong number of arguments is checked elsewhere and nothing is reported here. Terminates: a fixed number of tests on one call. Source: https://sqlite.org/lang_aggfunc.html, https://sqlite.org/windowfunctions.html. Status: Implemented.
Methods§
public function report(FunctionCall $call, Derivation $derivation): voidReports every rule the call breaks.
Parameters
$call | FunctionCall | |
$derivation | Derivation |
Test cases 1
Called from 1
Calls 6
- method-call Functions::row() line 36
- new Functions line 36
- function-call
countline 36 - method-call CallChecks::broken() line 40
- method-call Derivation::report() line 41
- new CallMisuse line 41
public function broken(FunctionCall $call, string $kind): list<CallMisuseRule>Answers the rules a call of a function of the kind breaks, in a fixed order.
Parameters
$call | FunctionCall | |
$kind | string | The kind code: s scalar, a aggregate, w window only |
Returns
list<CallMisuseRule>Test cases 2
Called from 1
Calls 9
- class-const SetQuantifier::Distinct() line 54
- class-const CallMisuseRule::WindowWithoutOver() line 56
- class-const CallMisuseRule::ScalarAsWindow() line 57
- class-const CallMisuseRule::FilterWithoutAggregate() line 58
- class-const CallMisuseRule::FilterOnWindowOnly() line 59
- class-const CallMisuseRule::OrderByWithoutAggregate() line 60
- class-const CallMisuseRule::DistinctInWindow() line 61
- class-const CallMisuseRule::DistinctArguments() line 62
- function-call
countline 62
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.