classKeywordWord
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.
(new \SqlSemantics\Platform\PostgreSql\Statement\Option\KeywordWord(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('none')))->word->value // => 'none'new \SqlSemantics\Platform\PostgreSql\Statement\Option\KeywordWord(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('fillfactor')) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstructionProperties§
public Name $wordMethods§
public function __construct(public Name $word)Parameters
$word | Name | The keyword in lower case |
Calls 6
- class-const GrammarRelease::PostgreSql166() line 40
- class-const GrammarRelease::PostgreSql172() line 40
- function-call
in_arrayline 41 - method-call Keywords::categories() line 41
- new Keywords line 41
- static-call Check::input() line 43
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: a keyword holds no expression.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
public function render(Output $out): voidWrites the keyword.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::keyword() line 58
- function-call
strtoupperline 58
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
OptionsTest::testArgumentLowersEveryValueKindcallsOperatorClassRuleTest::testArgumentLowersAReservedKeywordcallsArgumentTextTest::testTextReadsEachValueKindcallsAttributeReaderTest::testChoiceReadsOnlyAMemberTextcallsAttributeReaderTest::testReadYieldsTheArgumentOfEachReadingcallsBooleanArgumentTest::testValueReadsEachSpellingcallsNameArgumentTest::testPartsAnswersTheNamesTheServerReadscallsTypeArgumentTest::testTypeFactLooksUpEachSpellingcalls
Relations§
Instantiated in 4
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::argument() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:146
- new SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::argument() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:150
- new SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyOptionRule::argument() packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyOptionRule.php:160
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\OperatorClassRule::argument() packages/sql-semantics-postgres/src/Lowering/Routine/OperatorClassRule.php:224
Type checks 4
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Routine\ArgumentText::text() packages/sql-semantics-postgres/src/Rules/Routine/ArgumentText.php:45
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader::read() packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:113
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Copy\CopyOption::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Copy/CopyOption.php:47
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\NameArgument::parts() packages/sql-semantics-postgres/src/Statement/Object/Attribute/NameArgument.php:73
Type declarations 16
- type SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:140
- type SqlSemantics\Platform\PostgreSql\Lowering\Routine\OperatorClassRule packages/sql-semantics-postgres/src/Lowering/Routine/OperatorClassRule.php:218
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\ArgumentText packages/sql-semantics-postgres/src/Rules/Routine/ArgumentText.php:41
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeChecks packages/sql-semantics-postgres/src/Rules/Routine/AttributeChecks.php:128
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:91
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:101
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:125
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:140
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:150
- type SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:165
- type SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Attribute packages/sql-semantics-postgres/src/Statement/Object/Attribute/Attribute.php:55
- type SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\BooleanArgument packages/sql-semantics-postgres/src/Statement/Object/Attribute/BooleanArgument.php:41
- type SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\ChoiceArgument packages/sql-semantics-postgres/src/Statement/Object/Attribute/ChoiceArgument.php:42
- type SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\NameArgument packages/sql-semantics-postgres/src/Statement/Object/Attribute/NameArgument.php:53
- type SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\TextArgument packages/sql-semantics-postgres/src/Statement/Object/Attribute/TextArgument.php:39
- type SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\TypeArgument packages/sql-semantics-postgres/src/Statement/Object/Attribute/TypeArgument.php:42