classRoutineVariable
final class RoutineVariable
implements Scalar
uses Snapshot
Public API: explicitly declared with
@visibility public.A local variable of a stored program used as the count of NTILE or the offset of LEAD and LAG.
Rule: MYSQL-ROUTINE-VARIABLE-001. The server reads the name as a routine variable (PTI_int_splocal); outside a stored program it is the error ER_SP_UNDECLARED_VAR. The value is program state the context does not hold. Terminates: a leaf. Source: https://dev.mysql.com/doc/refman/8.4/en/window-function-descriptions.html#function_ntile. Status: Implemented.
(new \SqlSemantics\Platform\MySql\Statement\Call\Window\RoutineVariable(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('n')))->name->value // => 'n'Properties§
public Name $nameMethods§
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactAnswers that the value depends on the state of the stored program.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 4
- new ScalarFact line 49
- new Dependent line 49
- new SessionState line 49
- class-const Nullability::Dependent() line 49
public function render(Output $out): voidWrites the name.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::name() line 57
- class-const NameUse::Column() line 57
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.