final class AlteredOption
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One change to the options of a foreign-data object: ADD name 'value', SET name 'value' or DROP name.

Source: https://www.postgresql.org/docs/17/sql-alterforeigndatawrapper.html.

Dropping an optiondoctest
$change = new \SqlSemantics\Platform\PostgreSql\Statement\Option\AlteredOption(\SqlSemantics\Platform\PostgreSql\Statement\Option\OptionAction::Drop, new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('host'));
    $change->value // => null
Rejecting an added option without a valuedoctest
new \SqlSemantics\Platform\PostgreSql\Statement\Option\AlteredOption(\SqlSemantics\Platform\PostgreSql\Statement\Option\OptionAction::Add, new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('host')) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstruction

Properties§

public OptionAction $action
public Name $name
public StringConstant|null $value = null

Methods§

public function __construct(
    public OptionAction $action,
    public Name $name,
    public StringConstant|null $value = null,
)

Parameters

$actionOptionActionWhat is done with the option
$nameNameThe option name
$valueStringConstant|nullThe new value; absent exactly when the option is dropped
Calls 2
public function render(Output $out): void

Writes the action, the name and the value.

Parameters

$outOutput
Test cases 1
Calls 2

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 4
Constant reads 5