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.

Reading whether a function is declared deterministicdoctest
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE FUNCTION f() RETURNS INT NOT DETERMINISTIC RETURN 1');
    $create->statement->characteristics[0]->deterministic // => false

Properties§

public bool $deterministic

Methods§

public function __construct(public bool $deterministic)

Parameters

$deterministicboolWhether the routine is declared to return the same result for the same input
public function render(Output $out): void

Writes DETERMINISTIC, after NOT when the routine is declared not deterministic.

Parameters

$outOutput
Test cases 1
Calls 1

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
Type checks 1