final class KeywordAttribute
    implements ColumnAttribute
    uses Snapshot
Public API: explicitly declared with @visibility public.

A column attribute written as keywords alone, such as NOT NULL, AUTO_INCREMENT, PRIMARY KEY or INVISIBLE.

KEY alone means PRIMARY KEY and UNIQUE KEY means UNIQUE; the attribute is written in the full form and the short form respectively. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html.

Reading a keyword attributedoctest
(new \SqlSemantics\Platform\MySql\Statement\Table\Column\KeywordAttribute(\SqlSemantics\Platform\MySql\Statement\Table\Column\Kind\ColumnKeyword::AutoIncrement))->keyword->value // => 'AUTO_INCREMENT'

Properties§

public ColumnKeyword $keyword

Methods§

public function __construct(public ColumnKeyword $keyword)

Parameters

$keywordColumnKeywordThe attribute
public function deriveAttribute(Derivation $derivation, Environment $scope): void

Derives nothing: the attribute holds no expression.

Parameters

$derivationDerivation
$scopeEnvironment
public function render(Output $out): void

Writes the keywords.

Parameters

$outOutput
Calls 2

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 3

Relations§

Instantiated in 2
Type checks 3