final class ParallelSafety
    implements RoutineOption
    uses Snapshot
Public API: explicitly declared with @visibility public.

PARALLEL level: whether the routine can run in parallel mode.

The grammar reads any word; the server accepts safe, restricted and unsafe only, which is checked when the statement is derived. Source: https://www.postgresql.org/docs/17/sql-createfunction.html.

Telling an accepted leveldoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Routine\Option\ParallelSafety(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('safe')))->valid() // => true

Properties§

public Name $level

Methods§

public function __construct(public Name $level)

Parameters

$levelNameThe written level
public function valid(): bool

Tells whether the server accepts the level.

Returns

bool
Test cases 1
Calls 1
public function alterable(): bool

Tells that ALTER accepts the option.

Returns

bool
Test cases 1
public function setting(): string

Answers parallel.

Returns

string
Test cases 1
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: a word holds no expression.

Parameters

$derivationDerivation
$environmentEnvironment
Test cases 1
public function render(Output $out): void

Writes PARALLEL and the level.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 5§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5

Relations§

Instantiated in 1
Type checks 1