classDeterminism
final class Determinism
implements Characteristic
uses Snapshot
Public API: explicitly declared with
@visibility public.The DETERMINISTIC or NOT DETERMINISTIC characteristic of a stored routine.
It is accepted by CREATE only; ALTER PROCEDURE and ALTER FUNCTION have no such characteristic in the grammar. Source: https://dev.mysql.com/doc/refman/8.4/en/create-procedure.html.
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE FUNCTION f() RETURNS INT NOT DETERMINISTIC RETURN 1');
$create->statement->characteristics[0]->deterministic // => falseProperties§
public bool $deterministicMethods§
public function __construct(public bool $deterministic)Parameters
$deterministic | bool | Whether the routine is declared to return the same result for the same input |
public function render(Output $out): voidWrites DETERMINISTIC, after NOT when the routine is declared not deterministic.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::keyword() line 39
Test cases 6§
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 4
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Routine\CharacteristicRule::characteristic() packages/sql-semantics-mysql/src/Lowering/Routine/CharacteristicRule.php:98
- new SqlSemantics\Platform\MySql\Lowering\Routine\CharacteristicRule::characteristic() packages/sql-semantics-mysql/src/Lowering/Routine/CharacteristicRule.php:105