classGenericOption
final class GenericOption
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One option of an OPTIONS ( name 'value', ... ) list of a foreign-data object.
Source: https://www.postgresql.org/docs/17/sql-createforeigntable.html.
$option = new \SqlSemantics\Platform\PostgreSql\Statement\Option\GenericOption(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('host'), new \SqlSemantics\Platform\PostgreSql\Statement\Literal\StringConstant('db1'));
[$option->name->value, $option->value->value] // => ['host', 'db1']Properties§
public Name $namepublic StringConstant $valueMethods§
public function __construct(public Name $name, public StringConstant $value)Parameters
$name | Name | The option name |
$value | StringConstant | The option value |
public function render(Output $out): voidWrites the name and the value.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::name() line 41
- class-const NameUse::Label() line 41
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Relations§
Instantiated in 1
Constant reads 6
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\CreateFdw::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/CreateFdw.php:53
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\CreateForeignServer::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/CreateForeignServer.php:55
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\CreateUserMapping::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/CreateUserMapping.php:47
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\ForeignData\ImportForeignSchema::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/ForeignData/ImportForeignSchema.php:54
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\CreateForeignTable::__construct() packages/sql-semantics-postgres/src/Statement/Table/CreateForeignTable.php:58
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Element\ColumnDefinition::__construct() packages/sql-semantics-postgres/src/Statement/Table/Element/ColumnDefinition.php:68