final class Flags
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers the optional keywords several families share.

Rule: PG-FLAG-001. Scope: opt_or_replace, opt_concurrently, opt_with, opt_as, opt_table, opt_column, opt_default, opt_nowait, opt_procedural, opt_set_data, opt_drop_behavior, add_drop, document_or_content, unicode_normal_form. A flag is whether its keywords are written; a choice is an enum case. The noise words among them (opt_with, opt_as, opt_table, opt_column, opt_procedural, opt_set_data) are listed with their citations in the leaf noise table, and a command does not keep them. Source: the synopsis of each command in https://www.postgresql.org/docs/17/sql-commands.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function present(Node $flag): bool

Tells whether an optional keyword is written: opt_or_replace, opt_concurrently, opt_with, opt_as, opt_table, opt_column, opt_default, opt_nowait, opt_procedural or opt_set_data.

Parameters

$flagNode

Returns

bool

Throws

ImplementationGap When the production has no rule
Calls 2
public function dropBehavior(Node $behavior): ?DropBehavior

Lowers opt_drop_behavior; no keyword is null.

Parameters

$behaviorNode

Returns

Throws

ImplementationGap When the production has no rule
Calls 3
public function addOrDrop(Node $choice): AddOrDrop

Lowers add_drop.

Parameters

$choiceNode

Returns

Throws

ImplementationGap When the production has no rule
Calls 3
public function xmlOption(Node $option): XmlOption

Lowers document_or_content.

Parameters

$optionNode

Returns

Throws

ImplementationGap When the production has no rule
Calls 3
public function normalForm(Node $form): NormalForm

Lowers unicode_normal_form.

Parameters

$formNode

Returns

Throws

ImplementationGap When the production has no rule
Calls 5

Private surface 2§

Implementation details, listed for orientation only.

private const PRESENT = ['opt_or_replace: OR REPLACE' => true, 'opt_or_replace:' => false, 'opt_concurr…
private Lowering $lowering

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 1