classOptions
final class Options
Lowers the generic option machinery.
Rule: PG-OPTION-001. Scope: definition, def_list, def_elem, def_arg, opt_definition, reloptions, opt_reloptions, reloption_list, reloption_elem, create_generic_options, generic_option_list, generic_option_elem, alter_generic_options, alter_generic_option_list, alter_generic_option_elem, opt_boolean_or_string, NonReservedWord_or_Sconst, var_value, var_list, var_name. Constructors: Definition, GenericOption, AlteredOption, Word, KeywordWord, Toggle. An absent optional list is empty. An option changed without an action is added, as the manual states. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS, https://www.postgresql.org/docs/17/sql-alterforeigndatawrapper.html, https://www.postgresql.org/docs/17/sql-set.html. Status: Implemented.
Methods§
public function definitions(Node $list): list<Definition>Lowers definition, opt_definition, reloptions or opt_reloptions; an absent list is empty.
Parameters
$list | Node |
Returns
list<Definition>Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 4
- method-call Options::definitions() line 64
- method-call Lowering::items() line 65
- static-call ImplementationGap::production() line 67
- method-call Options::definition() line 71
public function definition(Node $element): DefinitionLowers reloption_elem, or def_elem through element().
Parameters
$element | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 3
- new Definition line 88
- method-call Options::argument() line 89
- method-call Options::element() line 92
public function elements(Node $definition): list<array{Name, TypeName|KeywordWord|OperatorName|SignedNumber|StringConstant|null}>Lowers definition into the name and the written value of each attribute, in written order.
Parameters
$definition | Node |
Returns
list<array{Name, TypeName|KeywordWord|OperatorName|SignedNumber|StringConstant|null}>Throws
ImplementationGap When the production has no ruleCalls 3
- static-call ImplementationGap::production() line 107
- method-call Lowering::items() line 110
- method-call Options::element() line 111
public function element(Node $element): array{Name, TypeName|KeywordWord|OperatorName|SignedNumber|StringConstant|null}Lowers def_elem into its name and written value.
Parameters
$element | Node |
Returns
array{Name, TypeName|KeywordWord|OperatorName|SignedNumber|StringConstant|null}Throws
ImplementationGap When the production has no ruleCalled from 2
Calls 2
- method-call Options::argument() line 130
- static-call ImplementationGap::production() line 131
public function argument(Node $argument): TypeName|KeywordWord|OperatorName|SignedNumber|StringConstantLowers def_arg.
Parameters
$argument | Node |
Throws
ImplementationGap When the production has no ruleCalled from 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:89
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::definition() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:91
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::element() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:130
Calls 5
- new KeywordWord line 146
- new Name line 146
- method-call Keywords::word() line 146
- new Keywords line 146
- static-call ImplementationGap::production() line 151
public function genericOptions(Node $list): list<GenericOption>Lowers create_generic_options or generic_option_list; an absent list is empty.
Parameters
$list | Node |
Returns
list<GenericOption>Throws
ImplementationGap When the production has no ruleCalls 3
- method-call Lowering::items() line 170
- new GenericOption line 171
- method-call Options::genericOption() line 171
public function genericOption(Node $element): array{Name, StringConstant}Lowers generic_option_elem into its name and value.
Parameters
$element | Node |
Returns
array{Name, StringConstant}Throws
ImplementationGap When the production has no ruleCalled from 4
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::genericOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:171
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:211
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:212
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Leaf\Options::alteredOptions() packages/sql-semantics-postgres/src/Lowering/Leaf/Options.php:213
Calls 1
- static-call ImplementationGap::production() line 188
public function alteredOptions(Node $list): list<AlteredOption>Lowers alter_generic_options.
Parameters
$list | Node |
Returns
list<AlteredOption>Throws
ImplementationGap When the production has no ruleCalls 7
- static-call ImplementationGap::production() line 205
- method-call Lowering::items() line 208
- new AlteredOption line 211
- class-const OptionAction::Add() line 211
- method-call Options::genericOption() line 211
- class-const OptionAction::Set() line 213
- class-const OptionAction::Drop() line 214
public function wordOrString(Node $value): Word|StringConstantLowers NonReservedWord_or_Sconst.
Parameters
$value | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 2
- new Word line 232
- static-call ImplementationGap::production() line 234
public function value(Node $value): OptionArgumentLowers opt_boolean_or_string or var_value.
Parameters
$value | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
Calls 6
- class-const Toggle::True() line 248
- class-const Toggle::False() line 249
- class-const Toggle::On() line 250
- method-call Options::wordOrString() line 251
- method-call Options::value() line 252
- static-call ImplementationGap::production() line 254
public function values(Node $list): list<OptionArgument>Lowers var_list.
Parameters
$list | Node |
Returns
list<OptionArgument>Calls 2
- method-call Lowering::items() line 266
- method-call Options::value() line 267
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
OptionsTestcalls