final class OptionRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers the options of EXPLAIN, VACUUM, ANALYZE, CLUSTER and REINDEX.

Rule: PG-UTILITY-OPTION-LOWER-001. Scope: utility_option_list, utility_option_elem, utility_option_name, utility_option_arg, opt_verbose, opt_full, opt_freeze, opt_analyze, analyze_keyword. Constructor: UtilityOption. A word of the older syntax becomes the option of its name without a value, as the grammar action does; the spelling ANALYSE is kept. Termination: the list is flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-explain.html, https://www.postgresql.org/docs/17/sql-vacuum.html, https://www.postgresql.org/docs/17/sql-analyze.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function options(Node $list): list<UtilityOption>
public function argument(Node $argument): Word|StringConstant|Toggle|SignedNumber|null

Lowers utility_option_arg; no value is null.

Parameters

$argumentNode

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 1
public function words(Node ...$words): list<UtilityOption>

Private surface 2§

Implementation details, listed for orientation only.

private const WORDS = ['opt_full: FULL' => 'full', 'opt_full:' => null, 'opt_freeze: FREEZE' => 'free…
private Lowering $lowering

Test cases 6§

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

Dedicated tests 6

Relations§

Instantiated in 3
Method calls 16