final class KeywordWord
    implements OptionArgument
    uses Snapshot
Public API: explicitly declared with @visibility public.

A reserved keyword, or NONE, written as the value of a definition option.

A definition accepts any reserved keyword as a value and passes its lower-case text to the command, as in CREATE OPERATOR ... (commutator = none) or (analyze = true). Source: https://www.postgresql.org/docs/17/sql-createoperator.html.

Reading the text of a keyword valuedoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Option\KeywordWord(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('none')))->word->value // => 'none'
Rejecting a word that is not a reserved keyworddoctest
new \SqlSemantics\Platform\PostgreSql\Statement\Option\KeywordWord(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('fillfactor')) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstruction

Properties§

public Name $word

Methods§

public function __construct(public Name $word)

Parameters

$wordNameThe keyword in lower case
Calls 6
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: a keyword holds no expression.

Parameters

$derivationDerivation
$environmentEnvironment
Test cases 1
public function render(Output $out): void

Writes the keyword.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 11§

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

Dedicated tests 3
Other tests reaching this symbol 8

Relations§

Instantiated in 4
Type checks 4
Type declarations 16