final class Definition
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

One named option of a definition or storage-parameter list: name, name = value or namespace.name = value.

Mirrors PostgreSQL's DefElem node as def_elem and reloption_elem write it. An option without a value is the option given alone, which most commands read as true. Source: https://www.postgresql.org/docs/17/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS.

Reading a storage parameterdoctest
$option = new \SqlSemantics\Platform\PostgreSql\Statement\Option\Definition(
        new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('fillfactor'),
        new \SqlSemantics\Platform\PostgreSql\Statement\Literal\SignedNumber(false, new \SqlSemantics\Platform\PostgreSql\Statement\Literal\IntegerConstant('70')),
    );
    [$option->name->value, $option->argument->magnitude->digits] // => ['fillfactor', '70']

Properties§

public Name $name
public OptionArgument|null $argument = null
public Name|null $qualifier = null

Methods§

public function __construct(
    public Name $name,
    public OptionArgument|null $argument = null,
    public Name|null $qualifier = null,
)

Parameters

$nameNameThe option name
$argumentOptionArgument|nullThe value; null when the option is given alone
$qualifierName|nullThe namespace written before the name, such as `toast`
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the value, which may be a type name with modifier expressions.

Parameters

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

Writes the qualified name and the value.

Parameters

$outOutput
Test cases 1
Calls 3

Test cases 3§

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 1

Relations§

Instantiated in 5
Constant reads 22
Type checks 1
Type declarations 1