classAlteredOption
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.
$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 // => nullnew \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\InvalidConstructionProperties§
public OptionAction $actionpublic Name $namepublic StringConstant|null $value = nullMethods§
public function __construct(
public OptionAction $action,
public Name $name,
public StringConstant|null $value = null,
)Parameters
$action | OptionAction | What is done with the option |
$name | Name | The option name |
$value | StringConstant|null | The new value; absent exactly when the option is dropped |
Calls 2
- static-call Check::input() line 38
- class-const OptionAction::Drop() line 38
public function render(Output $out): voidWrites the action, the name and the value.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::keyword() line 46
- class-const NameUse::Label() line 46
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
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:211
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:212
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:213
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:214
Constant reads 5
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\AlterFdw::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/AlterFdw.php:52
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\AlterForeignServer::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/AlterForeignServer.php:45
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\AlterUserMapping::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/AlterUserMapping.php:45
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Alter\Option\ColumnForeignOptions::__construct() packages/sql-semantics-postgres/src/Statement/Table/Alter/Option/ColumnForeignOptions.php:43
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Alter\Option\ForeignOptions::__construct() packages/sql-semantics-postgres/src/Statement/Table/Alter/Option/ForeignOptions.php:40