classDefinition
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.
$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 $namepublic OptionArgument|null $argument = nullpublic Name|null $qualifier = nullMethods§
public function __construct(
public Name $name,
public OptionArgument|null $argument = null,
public Name|null $qualifier = null,
)Parameters
$name | Name | The option name |
$argument | OptionArgument|null | The value; null when the option is given alone |
$qualifier | Name|null | The namespace written before the name, such as `toast` |
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives the value, which may be a type name with modifier expressions.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
public function render(Output $out): voidWrites the qualified name and the value.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call Output::name() line 58
- class-const NameUse::Label() line 58
- method-call Output::symbol() line 62
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
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:88
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:89
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:90
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:91
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:92
Constant reads 22
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Publication\AlterPublicationOptions::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Publication/AlterPublicationOptions.php:43
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Publication\CreatePublication::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Publication/CreatePublication.php:55
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Publication\Subscription\AlterSubscriptionOptions::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Publication/Subscription/AlterSubscriptionOptions.php:45
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Publication\Subscription\AlterSubscriptionPublications::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Publication/Subscription/AlterSubscriptionPublications.php:53
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Publication\Subscription\CreateSubscription::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Publication/Subscription/CreateSubscription.php:53
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Publication\Subscription\RefreshSubscription::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Publication/Subscription/RefreshSubscription.php:43
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Tablespace\AlterTablespaceOptions::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Tablespace/AlterTablespaceOptions.php:47
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Tablespace\CreateTablespace::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Tablespace/CreateTablespace.php:48
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\TextSearch\AlterTextSearchDictionary::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/TextSearch/AlterTextSearchDictionary.php:42
- class-const SqlSemantics\Platform\PostgreSql\Statement\Constraint\Column\ColumnPrimaryKey::__construct() packages/sql-semantics-postgres/src/Statement/Constraint/Column/ColumnPrimaryKey.php:45
- class-const SqlSemantics\Platform\PostgreSql\Statement\Constraint\Column\ColumnUnique::__construct() packages/sql-semantics-postgres/src/Statement/Constraint/Column/ColumnUnique.php:47
- class-const SqlSemantics\Platform\PostgreSql\Statement\Constraint\Table\Exclusion::__construct() packages/sql-semantics-postgres/src/Statement/Constraint/Table/Exclusion.php:83
- class-const SqlSemantics\Platform\PostgreSql\Statement\Constraint\Table\TablePrimaryKey::__construct() packages/sql-semantics-postgres/src/Statement/Constraint/Table/TablePrimaryKey.php:69
- class-const SqlSemantics\Platform\PostgreSql\Statement\Constraint\Table\TableUnique::__construct() packages/sql-semantics-postgres/src/Statement/Constraint/Table/TableUnique.php:71
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Alter\Column\ColumnAttributes::__construct() packages/sql-semantics-postgres/src/Statement/Table/Alter/Column/ColumnAttributes.php:45
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Alter\Option\RelationOptions::__construct() packages/sql-semantics-postgres/src/Statement/Table/Alter/Option/RelationOptions.php:42
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\CreateTable::__construct() packages/sql-semantics-postgres/src/Statement/Table/CreateTable.php:75
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\CreateTarget::__construct() packages/sql-semantics-postgres/src/Statement/Table/CreateTarget.php:62
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Index\CreateIndex::__construct() packages/sql-semantics-postgres/src/Statement/Table/Index/CreateIndex.php:89
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Index\IndexElement::__construct() packages/sql-semantics-postgres/src/Statement/Table/Index/IndexElement.php:58
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateMaterializedView::__construct() packages/sql-semantics-postgres/src/Statement/Table/View/CreateMaterializedView.php:76
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::__construct() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:79